aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-11-13 10:26:30 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-11-13 10:26:30 -0200
commit7d4828cc9fdc982ec713922777e77240892474e8 (patch)
treea7903a85534007d0b27b8bf5d30a992e287ddc5d
parent62f3b7c472c6bb293b3622ebdcd1747dc0e19d61 (diff)
downloadlua-7d4828cc9fdc982ec713922777e77240892474e8.tar.gz
lua-7d4828cc9fdc982ec713922777e77240892474e8.tar.bz2
lua-7d4828cc9fdc982ec713922777e77240892474e8.zip
avoid accessing wrong union field
-rw-r--r--ldo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldo.c b/ldo.c
index efdcbc1b..86e77f97 100644
--- a/ldo.c
+++ b/ldo.c
@@ -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 */