fix more endianness problems
This commit is contained in:
parent
d230ea824a
commit
6047cd72c9
3 changed files with 7 additions and 2 deletions
|
@ -64,10 +64,13 @@ public class InputStreamMessageReader {
|
|||
ByteBuffer[] segmentSlices = new ByteBuffer[segmentCount];
|
||||
|
||||
segmentSlices[0] = ByteBuffer.wrap(allSegments, 0, segment0Size);
|
||||
segmentSlices[0].order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
int offset = segment0Size;
|
||||
|
||||
for (int ii = 1; ii < segmentCount; ++ii) {
|
||||
segmentSlices[ii] = ByteBuffer.wrap(allSegments, offset, moreSizes.get(ii - 1));
|
||||
segmentSlices[ii].order(ByteOrder.LITTLE_ENDIAN);
|
||||
offset += moreSizes.get(ii - 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,6 @@ public class StructReader {
|
|||
this.pointers + ptrIndex,
|
||||
this.nestingLimit);
|
||||
} else {
|
||||
System.out.println("pointer count: " + this.pointerCount);
|
||||
return new PointerReader();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ class WireHelpers {
|
|||
|
||||
return new StructReader(segment,
|
||||
ptr.offset * 8,
|
||||
(ptr.offset + dataSizeWords) * 8,
|
||||
(ptr.offset + dataSizeWords),
|
||||
dataSizeWords * 64,
|
||||
structPtr.ptrCount(),
|
||||
(byte)0,
|
||||
|
@ -44,6 +44,9 @@ class WireHelpers {
|
|||
// TODO bounds check
|
||||
|
||||
int size = tag.inlineCompositeListElementCount();
|
||||
|
||||
System.out.println("size = " + size);
|
||||
|
||||
StructPointer structPtr = new StructPointer(tag);
|
||||
int wordsPerElement = structPtr.wordSize();
|
||||
|
||||
|
|
Loading…
Reference in a new issue