summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-01-08 00:18:22 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-01-08 00:18:22 +0800
commit51a929d50116d46f5ddd89abdf79e8dfe4a2435c (patch)
tree5f8bd2771fb12fa6b9aae40b16bc242573a7e9aa
parent74de7f5fe9c79e1661e8d075c5ab2d90889a864c (diff)
downloadpttbbs-51a929d50116d46f5ddd89abdf79e8dfe4a2435c.tar
pttbbs-51a929d50116d46f5ddd89abdf79e8dfe4a2435c.tar.gz
pttbbs-51a929d50116d46f5ddd89abdf79e8dfe4a2435c.tar.bz2
pttbbs-51a929d50116d46f5ddd89abdf79e8dfe4a2435c.tar.lz
pttbbs-51a929d50116d46f5ddd89abdf79e8dfe4a2435c.tar.xz
pttbbs-51a929d50116d46f5ddd89abdf79e8dfe4a2435c.tar.zst
pttbbs-51a929d50116d46f5ddd89abdf79e8dfe4a2435c.zip
Revert menu cursor_key changes, to prevent endless loop.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5764 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/menu.c9
1 files 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);
}