aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Str.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Str.c b/Str.c
index eff82a4..5287c0f 100644
--- a/Str.c
+++ b/Str.c
@@ -232,8 +232,8 @@ Strgrow(Str x)
{
char *old = x->ptr;
int newlen;
- newlen = x->length * 6 / 5;
- if (newlen == x->length)
+ newlen = x->area_size * 6 / 5;
+ if (newlen == x->area_size)
newlen += 2;
x->ptr = GC_MALLOC_ATOMIC(newlen);
x->area_size = newlen;