Skip to content

Commit

Permalink
Fix byte_array min required space allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
Pieter12345 committed Nov 15, 2023
1 parent 64deb06 commit 62a04f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private void checkSize(int need, Integer pos) {
maxValue = Math.max(maxValue, spos + need);
//Reallocate if needed
if(spos + need >= data.limit()) {
int newSize = data.limit() * SCALE_MULTIPLIER;
int newSize = Math.max(data.limit() * SCALE_MULTIPLIER, spos + need);
if(newSize <= 0) {
//Protect from this happening
newSize = 1;
Expand Down

0 comments on commit 62a04f0

Please sign in to comment.