aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'init.c')
-rw-r--r--init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.c b/init.c
index 6cba4b4..ec76ef3 100644
--- a/init.c
+++ b/init.c
@@ -249,7 +249,7 @@ parseinit(struct scope *s, struct type *t)
if (!typecompatible(expr->type->base, base))
error(&tok.loc, "array initializer is string literal with incompatible type");
if (t->incomplete)
- updatearray(t, expr->string.size + 1);
+ updatearray(t, expr->string.size);
goto add;
}
break;