diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-11-13 10:26:30 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-11-13 10:26:30 -0200 |
| commit | 7d4828cc9fdc982ec713922777e77240892474e8 (patch) | |
| tree | a7903a85534007d0b27b8bf5d30a992e287ddc5d | |
| parent | 62f3b7c472c6bb293b3622ebdcd1747dc0e19d61 (diff) | |
| download | lua-7d4828cc9fdc982ec713922777e77240892474e8.tar.gz lua-7d4828cc9fdc982ec713922777e77240892474e8.tar.bz2 lua-7d4828cc9fdc982ec713922777e77240892474e8.zip | |
avoid accessing wrong union field
| -rw-r--r-- | ldo.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 2.165 2017/11/02 11:28:56 roberto Exp $ | 2 | ** $Id: ldo.c,v 2.170 2017/11/07 13:25:26 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -365,7 +365,8 @@ int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres) { | |||
| 365 | luaD_hook(L, LUA_HOOKRET, -1); | 365 | luaD_hook(L, LUA_HOOKRET, -1); |
| 366 | firstResult = restorestack(L, fr); | 366 | firstResult = restorestack(L, fr); |
| 367 | } | 367 | } |
| 368 | L->oldpc = ci->previous->u.l.savedpc; /* 'oldpc' for caller function */ | 368 | if (isLua(ci->previous)) |
| 369 | L->oldpc = ci->previous->u.l.savedpc; | ||
| 369 | } | 370 | } |
| 370 | res = ci->func; /* res == final position of 1st result */ | 371 | res = ci->func; /* res == final position of 1st result */ |
| 371 | L->ci = ci->previous; /* back to caller */ | 372 | L->ci = ci->previous; /* back to caller */ |
