summaryrefslogtreecommitdiff
path: root/6/simp.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-01-24 04:58:12 -0500
committerOri Bernstein <ori@eigenstate.org>2016-01-24 04:58:12 -0500
commit94fe38f0e0291527680dff7ebf7539929317621c (patch)
treeb7e54241bbdcc2ce56d102458fd93c0eaa0edf54 /6/simp.c
parent89182b0cf8f7adf2f8a4708d750452d9a226aeea (diff)
downloadmc-94fe38f0e0291527680dff7ebf7539929317621c.tar.gz
Actually fix the lenghtless arrays.
Diffstat (limited to '6/simp.c')
-rw-r--r--6/simp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/6/simp.c b/6/simp.c
index 08f6e27..3705948 100644
--- a/6/simp.c
+++ b/6/simp.c
@@ -324,14 +324,14 @@ static Node *seqlen(Simp *s, Node *n, Type *ty)
{
Node *t, *r;
+ r = NULL;
if (exprtype(n)->type == Tyslice) {
t = slicelen(s, n);
r = simpcast(s, t, ty);
} else if (exprtype(n)->type == Tyarray) {
t = exprtype(n)->asize;
- r = simpcast(s, t, ty);
- } else {
- r = NULL;
+ if (t)
+ r = simpcast(s, t, ty);
}
return r;
}