summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-24 00:34:21 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-24 00:34:21 +0800
commit747a79d7325bfc5064275448a8580ab49588db5a (patch)
tree1037ee1404aeb778d65ea4af2f687e9f790c6ffe
parent91f6682a7690a4dd6ae160804b2009a0a98f8122 (diff)
downloadpttbbs-747a79d7325bfc5064275448a8580ab49588db5a.tar
pttbbs-747a79d7325bfc5064275448a8580ab49588db5a.tar.gz
pttbbs-747a79d7325bfc5064275448a8580ab49588db5a.tar.bz2
pttbbs-747a79d7325bfc5064275448a8580ab49588db5a.tar.lz
pttbbs-747a79d7325bfc5064275448a8580ab49588db5a.tar.xz
pttbbs-747a79d7325bfc5064275448a8580ab49588db5a.tar.zst
pttbbs-747a79d7325bfc5064275448a8580ab49588db5a.zip
a small bug fixed
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1829 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/io.c10
1 files 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