From 51a929d50116d46f5ddd89abdf79e8dfe4a2435c Mon Sep 17 00:00:00 2001 From: piaip Date: Mon, 7 Jan 2013 16:18:22 +0000 Subject: Revert menu cursor_key changes, to prevent endless loop. git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5764 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/mbbsd/menu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pttbbs/mbbsd/menu.c b/pttbbs/mbbsd/menu.c index e26a987e..efee47b9 100644 --- a/pttbbs/mbbsd/menu.c +++ b/pttbbs/mbbsd/menu.c @@ -565,14 +565,17 @@ domenu(int menu_index, const char *cmdtitle, int cmd, const commands_t cmdtable[ show_status(); refscreen = NA; } - + cursor_clear(decide_menu_row(cmdtable) + pos, menu_column); n = pos = -1; while (++n <= (lastcmdptr = i)) if (CheckMenuPerm(cmdtable[n].level)) pos++; - cmd = cursor_key(decide_menu_row(cmdtable) + pos, menu_column); - } while (cmd != EOF || refscreen); + // If we want to replace cursor_show by cursor_key, it must be inside + // while(expr) othrewise calling 'continue' inside for-loop won't wait + // for key. + cursor_show(decide_menu_row(cmdtable) + pos, menu_column); + } while (((cmd = vkey()) != EOF) || refscreen); abort_bbs(0); } -- cgit v1.2.3