In sb_lua_new_state() always push a value on stack before calling lua_setglobal().

This commit is contained in:
Alexey Kopytov
2016-10-16 20:16:29 +03:00
parent 25c10a0199
commit 71e145c483

View File

@ -411,10 +411,12 @@ lua_State *sb_lua_new_state(const char *scriptname, int thread_id)
break;
case SB_ARG_TYPE_FILE:
/* FIXME: no need to export anything */
lua_pushnil(state);
break;
default:
log_text(LOG_WARNING, "Global option '%s' will not be exported, because"
" the type is unknown", opt->name);
lua_pushnil(state);
break;
}