summaryrefslogtreecommitdiff
path: root/6/blob.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-04-27 18:15:45 -0700
committerOri Bernstein <ori@eigenstate.org>2018-04-27 18:16:17 -0700
commit89331eff71ab876a5b6b534141b1422b2ca42e0b (patch)
tree8172fa0cad3e0a050a18a173dd96de04b89691ac /6/blob.c
parent32ff704e0db8256cb6535341ae789a15e143745f (diff)
downloadmc-89331eff71ab876a5b6b534141b1422b2ca42e0b.tar.gz
Extract slices recursively.
This fixes deeply nestedl slices of arrays of slices of arrays.
Diffstat (limited to '6/blob.c')
-rw-r--r--6/blob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/6/blob.c b/6/blob.c
index 4c1fa0b..410acab 100644
--- a/6/blob.c
+++ b/6/blob.c
@@ -205,7 +205,7 @@ blobslice(Blob *seq, Htab *globls, Htab *strtab, Node *n)
sz = tysize(tybase(exprtype(base))->sub[0]);
lbl = htget(globls, base);
slbase = mkblobref(lbl, loval*sz, 1);
- } else if (exprop(base) == Olit) {
+ } else if (exprop(base) == Olit || exprop(base) == Oarr) {
slbase = mkblobi(Bti64, getintlit(base, "invalid base expr"));
} else {
fatal(base, "slice base is not a constant value");