aboutsummaryrefslogtreecommitdiffstats
path: root/Str.c
diff options
context:
space:
mode:
Diffstat (limited to 'Str.c')
-rw-r--r--Str.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Str.c b/Str.c
index 4345168..aa47dc6 100644
--- a/Str.c
+++ b/Str.c
@@ -212,7 +212,7 @@ Strcat_charp_n(Str x, const char *y, int n)
}
if (x->area_size < newlen) {
char *old = x->ptr;
- newlen = newlen * 3 / 2;
+ newlen += newlen / 2;
if (newlen < 0 || newlen > STR_SIZE_MAX)
newlen = STR_SIZE_MAX;
x->ptr = GC_MALLOC_ATOMIC(newlen);