summaryrefslogtreecommitdiff
path: root/6/simp.c
diff options
context:
space:
mode:
authorAndrew Chambers <andrewchamberss@gmail.com>2016-02-06 11:20:55 +1300
committerAndrew Chambers <andrewchamberss@gmail.com>2016-02-06 11:21:15 +1300
commit932320f93ec0266a53c3e50600d73d3d23e1db76 (patch)
tree0d106dc6f3064b022fcda0c9e0fbb6ae14d11df4 /6/simp.c
parent3c1277e37fbaea87d770d4a64a5029c4a693bb63 (diff)
downloadmc-932320f93ec0266a53c3e50600d73d3d23e1db76.tar.gz
fix rval len, fixes #69
Diffstat (limited to '6/simp.c')
-rw-r--r--6/simp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/6/simp.c b/6/simp.c
index b1fe969..28548c6 100644
--- a/6/simp.c
+++ b/6/simp.c
@@ -295,7 +295,7 @@ static void cjmp(Simp *s, Node *cond, Node *iftrue, Node *iffalse)
static Node *slicelen(Simp *s, Node *sl)
{
/* *(&sl + sizeof(size_t)) */
- return load(addk(addr(s, sl, tyintptr), Ptrsz));
+ return load(addk(addr(s, rval(s, sl, NULL), tyintptr), Ptrsz));
}
Node *loadvar(Simp *s, Node *n, Node *dst)