bug fix, fixed reverse order in BinaryStruct parsing

This commit is contained in:
Ziver Koc 2016-02-02 09:38:08 +01:00
parent 644c5ab6ea
commit 4d31e66ebd
3 changed files with 23 additions and 8 deletions

View file

@ -56,7 +56,7 @@ public class BinaryStructParser {
int readLength = 0;
byte[] valueData = new byte[(int) Math.ceil(length / 8.0)];
for (int index = valueData.length - 1; index >= 0; --index) {
for (int index = 0; index < valueData.length; ++index) {
valueData[index] = ByteUtil.getBits(data[byteIndex], bitIndex, bitLength);
readLength += bitLength;
byteIndex++;