expand lua stack first

This commit is contained in:
Cloud Wu
2015-07-24 17:50:42 +08:00
parent 1da8a6b38d
commit e87ac18b84
3 changed files with 22 additions and 1 deletions

View File

@@ -376,6 +376,7 @@ pconv(lua_State *L) {
static void
convert_stringmap(struct context *ctx, struct table *tbl) {
lua_State *L = ctx->L;
lua_checkstack(L, ctx->string_index + LUA_MINSTACK);
lua_settop(L, ctx->string_index + 1);
lua_pushvalue(L, 1);
struct state * s = lua_newuserdata(L, sizeof(*s));