mirror of
https://github.com/nodemcu/nodemcu-firmware.git
synced 2025-01-16 20:52:57 +08:00
Fixed broken linear growth allocation in cjson.
This commit is contained in:
parent
595509a7f3
commit
eae72699d0
@ -151,7 +151,7 @@ static int calculate_new_size(strbuf_t *s, int len)
|
||||
newsize *= -s->increment;
|
||||
} else {
|
||||
/* Linear sizing */
|
||||
newsize = ((newsize + s->increment - 1) / s->increment) * s->increment;
|
||||
newsize = (((reqsize -1) / s->increment) + 1) * s->increment;
|
||||
}
|
||||
|
||||
return newsize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user