diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-07 13:59:01 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-07 13:59:01 -0300 |
| commit | d1ed6e4c073c85c5f9a35f5a12adb3fc7c21c2c5 (patch) | |
| tree | dc5de48ee9b7949c0329872a048f7422bf25f236 | |
| parent | b6a7983b650a572a9f04c1dd8b243cf5e081caa2 (diff) | |
| download | lua-d1ed6e4c073c85c5f9a35f5a12adb3fc7c21c2c5.tar.gz lua-d1ed6e4c073c85c5f9a35f5a12adb3fc7c21c2c5.tar.bz2 lua-d1ed6e4c073c85c5f9a35f5a12adb3fc7c21c2c5.zip | |
small bug: must use original (previous) base
| -rw-r--r-- | lvm.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 2.25 2005/02/18 12:50:08 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.26 2005/02/23 17:30:22 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -620,7 +620,7 @@ StkId luaV_execute (lua_State *L, int nexeccalls) { | |||
| 620 | int aux; | 620 | int aux; |
| 621 | StkId func = ci->func; | 621 | StkId func = ci->func; |
| 622 | StkId pfunc = (ci+1)->func; /* previous function index */ | 622 | StkId pfunc = (ci+1)->func; /* previous function index */ |
| 623 | if (L->openupval) luaF_close(L, base); | 623 | if (L->openupval) luaF_close(L, ci->base); |
| 624 | base = ci->base = ci->func + ((ci+1)->base - pfunc); | 624 | base = ci->base = ci->func + ((ci+1)->base - pfunc); |
| 625 | L->base = base; | 625 | L->base = base; |
| 626 | for (aux = 0; pfunc+aux < L->top; aux++) /* move frame down */ | 626 | for (aux = 0; pfunc+aux < L->top; aux++) /* move frame down */ |
