From 747a79d7325bfc5064275448a8580ab49588db5a Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 23 Apr 2004 16:34:21 +0000 Subject: a small bug fixed git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1829 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/io.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mbbsd/io.c b/mbbsd/io.c index 3429a3c3..21a8045b 100644 --- a/mbbsd/io.c +++ b/mbbsd/io.c @@ -213,13 +213,11 @@ igetch() KEY_ESC_arg = ch; return KEY_ESC; } - } else if (mode == 2) { /* Cursor key */ - if (ch >= 'A' && ch <= 'D') - return KEY_UP + (ch - 'A'); - else if (ch >= '1' && ch <= '6') + } else if (mode == 2 && ch >= 'A' && ch <= 'D') /* Cursor key */ + return KEY_UP + (ch - 'A'); + else if (mode == 2 && ch >= '1' && ch <= '6') { mode = 3; last = ch; } - } else if (mode == 3) { /* Ins Del Home End PgUp PgDn */ - if (ch == '~') + else if (mode == 3 && ch == '~') { /* Ins Del Home End PgUp PgDn */ return KEY_HOME + (last - '1'); } else // here is switch for default keys -- cgit v1.2.3