diff options
Diffstat (limited to 'mbbsd/bbslua.c')
-rw-r--r-- | mbbsd/bbslua.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/mbbsd/bbslua.c b/mbbsd/bbslua.c index 52247a44..7e755b5e 100644 --- a/mbbsd/bbslua.c +++ b/mbbsd/bbslua.c @@ -1153,12 +1153,6 @@ bbslua(const char *fpath) int lineshift; AllocData ad; - alloc_init(&ad); - L = lua_newstate(allocf, &ad); - if (!L) - return 0; - lua_atpanic(L, &panic); - #ifdef UMODE_BBSLUA unsigned int prevmode = getutmpmode(); #endif @@ -1167,6 +1161,13 @@ bbslua(const char *fpath) if (runningBBSLua) return 0; + // init lua + alloc_init(&ad); + L = lua_newstate(allocf, &ad); + if (!L) + return 0; + lua_atpanic(L, &panic); + abortBBSLua = 0; // detect file |