summaryrefslogtreecommitdiffstats
path: root/abs/extra/community/lua/lua-5.1.3-official-patch2.diff
blob: 05ac24416c7e79cbd0e4144145b3919bd00ec6a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- src/lbaselib.c	(old)
+++ src/lbaselib.c	(new)
@@ -526,7 +526,7 @@
   status = lua_resume(co, narg);
   if (status == 0 || status == LUA_YIELD) {
     int nres = lua_gettop(co);
-    if (!lua_checkstack(L, nres))
+    if (!lua_checkstack(L, nres + 1))
       luaL_error(L, "too many results to resume");
     lua_xmove(co, L, nres);  /* move yielded values */
     return nres;