summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--parse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/parse.c b/parse.c
index edb6c29..b393fc2 100644
--- a/parse.c
+++ b/parse.c
@@ -960,9 +960,9 @@ parseseg(Seg *seg, Typ *ty, int t)
 		err(", or } expected");
 	seg[n].type = SEnd;
 	a = 1 << al;
-	sz = (sz + a - 1) & -a;
-	if (sz >= ty->size)
-		ty->size = sz;
+	if (sz < ty->size)
+		sz = ty->size;
+	ty->size = (sz + a - 1) & -a;
 	ty->align = al;
 }