Commits

Harald Klimach  committed dcbc58b

Applied patch 2 for Lua 5.2.1
(from: http://www.lua.org/bugs.html#5.2.1-2)

  • Participants
  • Parent commits f5c8496

Comments (0)

Files changed (1)

File external/lua-5.2.1/src/ldo.c

   int n;
   lua_assert(ci->u.c.k != NULL);  /* must have a continuation */
   lua_assert(L->nny == 0);
-  /* finish 'lua_callk' */
+  if (ci->callstatus & CIST_YPCALL) {  /* was inside a pcall? */
+    ci->callstatus &= ~CIST_YPCALL;  /* finish 'lua_pcall' */
+    L->errfunc = ci->u.c.old_errfunc;
+  }
+  /* finish 'lua_callk'/'lua_pcall' */
   adjustresults(L, ci->nresults);
   /* call continuation function */
   if (!(ci->callstatus & CIST_STAT))  /* no call status? */