Merge pull request #13 from spyapalli/master
Kaitai b32 result is inconsistent for some payload because of overflo…
This commit is contained in:
commit
3b94aa4643
|
@ -333,7 +333,7 @@ namespace Kaitai
|
||||||
byte[] buf = ReadBytes(bytesNeeded);
|
byte[] buf = ReadBytes(bytesNeeded);
|
||||||
for (int i = 0; i < buf.Length; i++)
|
for (int i = 0; i < buf.Length; i++)
|
||||||
{
|
{
|
||||||
ulong v = (ulong)(buf[i] << BitsLeft);
|
ulong v = (ulong)((ulong)buf[i] << BitsLeft);
|
||||||
Bits |= v;
|
Bits |= v;
|
||||||
BitsLeft += 8;
|
BitsLeft += 8;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue