Commit eae72699 authored by Johny Mattsson's avatar Johny Mattsson
Browse files

Fixed broken linear growth allocation in cjson.

parent 595509a7
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment