aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tccgen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tccgen.c b/tccgen.c
index 3cd28ed..270d11c 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -5847,7 +5847,7 @@ static void decl_initializer_alloc(CType *type, AttributeDef *ad, int r,
tcc_error("unknown type size");
}
if (flexible_array)
- size += flexible_array->type.ref->c * pointed_size(&flexible_array->type);
+ size += flexible_array->type.ref->c * pointed_size(&flexible_array->type) + 1;
/* take into account specified alignment if bigger */
if (ad->a.aligned) {
if (ad->a.aligned > align)