summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-14 22:07:33 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-14 22:07:33 +0800
commita2f6c27927c37f89b888f9e4c1afe96049bdf406 (patch)
tree43580f63b1c79f45de6898a7ee4dd9157bbc0e12 /mbbsd
parent627bad95e53776d5b579a2072627e353ab52dda5 (diff)
downloadpttbbs-a2f6c27927c37f89b888f9e4c1afe96049bdf406.tar
pttbbs-a2f6c27927c37f89b888f9e4c1afe96049bdf406.tar.gz
pttbbs-a2f6c27927c37f89b888f9e4c1afe96049bdf406.tar.bz2
pttbbs-a2f6c27927c37f89b888f9e4c1afe96049bdf406.tar.lz
pttbbs-a2f6c27927c37f89b888f9e4c1afe96049bdf406.tar.xz
pttbbs-a2f6c27927c37f89b888f9e4c1afe96049bdf406.tar.zst
pttbbs-a2f6c27927c37f89b888f9e4c1afe96049bdf406.zip
- bbslua: fix crash on printing error message
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4163 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbslua.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/bbslua.c b/mbbsd/bbslua.c
index 2b276b3b..d1dd5360 100644
--- a/mbbsd/bbslua.c
+++ b/mbbsd/bbslua.c
@@ -1728,11 +1728,11 @@ bbslua(const char *fpath)
if (r != 0)
{
const char *errmsg = lua_tostring(L, -1);
- lua_close(L);
outs(ANSI_RESET);
move(b_lines-3, 0); clrtobot();
outs("\n");
outs(errmsg);
+ lua_close(L); // delay closing because we need to print out error message
vmsg("BBS-Lua 載入錯誤: 請通知作者修正程式碼。");
return 0;
}