ref: 94fe38f0e0291527680dff7ebf7539929317621c
parent: 89182b0cf8f7adf2f8a4708d750452d9a226aeea
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Jan 23 23:58:12 EST 2016
Actually fix the lenghtless arrays.
--- a/6/simp.c
+++ b/6/simp.c
@@ -324,14 +324,14 @@
{
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;
}