You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling writeLong()/writeInt() after writeVarLong()/writeVarInt() will write the Long/Int in little endian order, because the order() in the nioBuffer is set to little endian in writeVar*().
A certain use-case would be having a fixed-size header which contains the number of elements in the buffer, which will be written to after writing the VarLong/VarInt.
Perhaps the order() of the nioBuffer should be reverted to the original order after writeVar*() ?
The text was updated successfully, but these errors were encountered:
Upon further inspection, this case happens when the buffer overflows during a require(int), in a writeVar*() method. Before throwing the KryoException, it's possible to reset the order of the nioBuffer. I can make a PR for this.
I also noticed that setting the order/position on the BufferOutput does not set the position/order on the nioBuffer.
stau
added a commit
to stau/kryo
that referenced
this issue
Feb 23, 2016
Calling writeLong()/writeInt() after writeVarLong()/writeVarInt() will write the Long/Int in little endian order, because the order() in the nioBuffer is set to little endian in writeVar*().
A certain use-case would be having a fixed-size header which contains the number of elements in the buffer, which will be written to after writing the VarLong/VarInt.
Perhaps the order() of the nioBuffer should be reverted to the original order after writeVar*() ?
The text was updated successfully, but these errors were encountered: