We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 939c511 commit 073363cCopy full SHA for 073363c
src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SerializationWriter.java
@@ -709,9 +709,13 @@ private void serializeContext(CallFrame cf) {
709
/* Grows a buffer as needed to hold more data. */
710
private void growToHold(int idx, int required) {
711
ByteBuffer check = this.outputs[idx];
712
- if (check.position() + required >= check.capacity()) {
+ int position = check.position();
713
+ if (position + required >= check.capacity()) {
714
ByteBuffer replacement = ByteBuffer.allocate(check.capacity() * 2);
715
+ replacement.order(ByteOrder.LITTLE_ENDIAN);
716
+ check.position(0);
717
replacement.put(check);
718
+ replacement.position(position);
719
this.outputs[idx] = replacement;
720
}
721
0 commit comments