diff --git a/ICD.Common.Utils/BigEndianBitConverter.cs b/ICD.Common.Utils/BigEndianBitConverter.cs index f5a0e0c..67d79c4 100644 --- a/ICD.Common.Utils/BigEndianBitConverter.cs +++ b/ICD.Common.Utils/BigEndianBitConverter.cs @@ -78,9 +78,9 @@ namespace ICD.Common.Utils if (startIndex > value.Length - bytes) throw new ArgumentException("Array plus start index too small"); - int result = 0; + long result = 0; for (int i = 0; i < bytes; i++) - result |= value[i + startIndex] << GetBitShift(i, bytes); + result |= (long)(value[i + startIndex]) << GetBitShift(i, bytes); return result; }