From a2f6c27927c37f89b888f9e4c1afe96049bdf406 Mon Sep 17 00:00:00 2001 From: piaip Date: Mon, 14 Apr 2008 14:07:33 +0000 Subject: - bbslua: fix crash on printing error message git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4163 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbslua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mbbsd') 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; } -- cgit v1.2.3