summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-13 22:26:00 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-13 22:26:00 -0800
commit5a1d952aa7f08885c8de6afbbfa948c675f79f89 (patch)
treefd1ee8287965627f8e654600bff812129de6dfc7 /mi
parentc39b0cd430515c79ce14792b6f815cb7dd9f6e90 (diff)
downloadmc-5a1d952aa7f08885c8de6afbbfa948c675f79f89.tar.gz
Fix a couple of segfaults.
We should actually use valid values when generating errors.
Diffstat (limited to 'mi')
-rw-r--r--mi/match.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mi/match.c b/mi/match.c
index df335f8..6396dbb 100644
--- a/mi/match.c
+++ b/mi/match.c
@@ -565,6 +565,10 @@ static int addstruct(Node *pat, Node *val, Dtree *start, Dtree *accept, Node ***
tail = NULL;
ntail = 0;
+ if (!memb) {
+ memb = mkexpr(ty->sdecls[i]->loc, Ogap, NULL);
+ memb->expr.type = mty;
+ }
for (j = 0; j < nlast; j++) {
/* add a _ capture if we don't specify the value */
if (!memb) {