aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-04-24 22:28:52 -0700
committerMichael Forney <mforney@mforney.org>2019-04-24 22:32:22 -0700
commita71a7975c95b794983c4b83a26981c7b4d7f7c82 (patch)
treee8412ab368a931c8df30faab09c64e6283aae14f /init.c
parent0e9f74cb67f2227f888e9a127624f77d83aee270 (diff)
Use a common member for expression base
Diffstat (limited to 'init.c')
-rw-r--r--init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.c b/init.c
index 2eee141..edecfa0 100644
--- a/init.c
+++ b/init.c
@@ -240,8 +240,8 @@ parseinit(struct scope *s, struct type *t)
t = p.sub->type;
switch (t->kind) {
case TYPEARRAY:
- if (expr->decayed && expr->unary.base->kind == EXPRSTRING) {
- expr = expr->unary.base;
+ if (expr->decayed && expr->base->kind == EXPRSTRING) {
+ expr = expr->base;
base = t->base;
/* XXX: wide string literals */
if (!(base->prop & PROPCHAR))