|
@@ -1549,9 +1549,10 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
|
|
luaF_close(L, base, NOCLOSINGMETH);
|
|
luaF_close(L, base, NOCLOSINGMETH);
|
|
lua_assert(base == ci->func + 1);
|
|
lua_assert(base == ci->func + 1);
|
|
}
|
|
}
|
|
- if (!ttisfunction(s2v(ra))) { /* not a function? */
|
|
|
|
|
|
+ while (!ttisfunction(s2v(ra))) { /* not a function? */
|
|
luaD_tryfuncTM(L, ra); /* try '__call' metamethod */
|
|
luaD_tryfuncTM(L, ra); /* try '__call' metamethod */
|
|
b++; /* there is now one extra argument */
|
|
b++; /* there is now one extra argument */
|
|
|
|
+ checkstackp(L, 1, ra);
|
|
}
|
|
}
|
|
if (!ttisLclosure(s2v(ra))) { /* C function? */
|
|
if (!ttisLclosure(s2v(ra))) { /* C function? */
|
|
luaD_call(L, ra, LUA_MULTRET); /* call it */
|
|
luaD_call(L, ra, LUA_MULTRET); /* call it */
|