diff options
-rw-r--r-- | src/cmd/rc/code.c | 6 | ||||
-rw-r--r-- | src/cmd/rc/simple.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/rc/code.c b/src/cmd/rc/code.c index 2c33e804..eeaa3ed8 100644 --- a/src/cmd/rc/code.c +++ b/src/cmd/rc/code.c @@ -339,9 +339,9 @@ outcode(tree *t, int eflag) outcode(c0, eflag); emitf(Xlocal); } - t = tt; - outcode(c2, eflag); - for(;t->type=='=';t = c2) emitf(Xunlocal); + outcode(t, eflag); + for(t = tt; t->type=='='; t = c2) + emitf(Xunlocal); } else{ for(t = tt;t;t = c2){ diff --git a/src/cmd/rc/simple.c b/src/cmd/rc/simple.c index 15814c5c..d587227a 100644 --- a/src/cmd/rc/simple.c +++ b/src/cmd/rc/simple.c @@ -130,7 +130,7 @@ execfunc(var *func) starval = runq->argv->words; runq->argv->words = 0; poplist(); - start(func->fn, func->pc, (struct var *)0); + start(func->fn, func->pc, runq->local); runq->local = newvar(strdup("*"), runq->local); runq->local->val = starval; runq->local->changed = 1; |