We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 238b5f5 commit 2d9531aCopy full SHA for 2d9531a
py/vstr.c
@@ -151,7 +151,7 @@ STATIC bool vstr_ensure_extra(vstr_t *vstr, size_t size) {
151
if (vstr->fixed_buf) {
152
return false;
153
}
154
- size_t new_alloc = ROUND_ALLOC((vstr->len + size) * 2);
+ size_t new_alloc = ROUND_ALLOC((vstr->len + size) + 64);
155
char *new_buf = m_renew(char, vstr->buf, vstr->alloc, new_alloc);
156
if (new_buf == NULL) {
157
vstr->had_error = true;
0 commit comments