Skip to content

Commit

Permalink
Fix byte_array endianness reset when byte_array allocates more memory
Browse files Browse the repository at this point in the history
Occurred first when a `byte_array` grows to size 1024, required calling `ba_set_little_endian(true)` again after more memory was allocated as a workaround. With this commit, the endianness is preserved correctly.
  • Loading branch information
Pieter12345 committed Nov 29, 2024
1 parent 32b284d commit bf2a6fe
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ private void checkSize(int need, Integer pos) {
int position = data.position();
data.rewind();
temp.put(data);
temp.order(data.order());
temp.position(position);
data = temp;
data.position(position);
}
value = null;
}
Expand Down

0 comments on commit bf2a6fe

Please sign in to comment.