rc: fix local variables in functions
reported by micah stetson:
fn foo { echo $bar }
bar=baz foo
This commit is contained in:
parent
0e430b25b2
commit
362264eb51
2 changed files with 4 additions and 4 deletions
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue