In sb_lua_new_state() always push a value on stack before calling lua_setglobal().
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user