From 87c171ae1e929c62d0e3cf1db2e208fe54cbe965 Mon Sep 17 00:00:00 2001 From: piaip Date: Sun, 13 Apr 2008 13:54:34 +0000 Subject: - fix loginview crash (having NULL entries) - make aligned comments as exp feature git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4159 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/board.c | 3 +++ mbbsd/mbbsd.c | 2 ++ mbbsd/user.c | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'mbbsd') diff --git a/mbbsd/board.c b/mbbsd/board.c index 26add700..46b2633d 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -392,10 +392,13 @@ b_config(void) (bp->brdattr & BRD_IPLOGRECMD) ? ANSI_COLOR(1)"自動":"不會"); +// enable if we have it. +#ifdef EXP_ALIGNEDCMT prints( " " ANSI_COLOR(1;36) "a" ANSI_RESET " - 推文時 %s" ANSI_RESET " 開頭\n", (bp->brdattr & BRD_ALIGNEDCMT) ? ANSI_COLOR(1)"對齊":"不對齊"); +#endif #ifdef USE_AUTOCPLOG prints( " " ANSI_COLOR(1;36) "x" ANSI_RESET diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 72b40cc5..2675b856 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1296,6 +1296,8 @@ user_login(void) if ((cuser.loginview >> i) & 1) { const char *fn = loginview_file[(int)i][0]; + if (!fn) + break; if (*fn == '@') // special { // since only one special now, let's write directly... diff --git a/mbbsd/user.c b/mbbsd/user.c index 72e175a4..f2b4eda8 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -51,7 +51,8 @@ u_loginview(void) in = i; clrtobot(); - while ((i = getkey("請按 [A-N] 切換設定,按 [Return] 結束:"))!='\r') + while ((i = getkey("請按 [A-%c] 切換設定,按 [Return] 結束:", + 'A'+in-1))!='\r') { i = i - 'a'; if (i >= in || i < 0) -- cgit v1.2.3