Kaitai b32 result is inconsistent for some payload because of overflow #12

This commit is contained in:
PYAPALLI,SAI KISHORE 2019-01-31 12:00:11 -05:00
parent 86c9b7dccb
commit 0c13bfc90c
1 changed files with 1 additions and 1 deletions

View File

@ -333,7 +333,7 @@ namespace Kaitai
byte[] buf = ReadBytes(bytesNeeded);
for (int i = 0; i < buf.Length; i++)
{
ulong v = (ulong)(buf[i] << BitsLeft);
ulong v = (ulong)((ulong)buf[i] << BitsLeft);
Bits |= v;
BitsLeft += 8;
}