diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-28 12:47:37 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-28 12:47:37 +0800 |
commit | f6172d5bc668be2372fcb23d5c05e7f70f9af201 (patch) | |
tree | dabbc7258fff05a4f1fd3848f152037293d59de1 /mbbsd/read.c | |
parent | 730e5cbbccac23c675e7e525b83472d85967bed7 (diff) | |
download | pttbbs-f6172d5bc668be2372fcb23d5c05e7f70f9af201.tar pttbbs-f6172d5bc668be2372fcb23d5c05e7f70f9af201.tar.gz pttbbs-f6172d5bc668be2372fcb23d5c05e7f70f9af201.tar.bz2 pttbbs-f6172d5bc668be2372fcb23d5c05e7f70f9af201.tar.lz pttbbs-f6172d5bc668be2372fcb23d5c05e7f70f9af201.tar.xz pttbbs-f6172d5bc668be2372fcb23d5c05e7f70f9af201.tar.zst pttbbs-f6172d5bc668be2372fcb23d5c05e7f70f9af201.zip |
distinguish functions that need item or not, and allow the latter in empty itemlist.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3097 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/read.c')
-rw-r--r-- | mbbsd/read.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c index af304da3..75e144e8 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -838,10 +838,10 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem, default: if( ch == 'h' && currmode & (MODE_DIGEST) ) break; - if(locmem->crs_ln == 0) - break; if (ch > 0 && ch <= onekey_size) { - int (*func)() = rcmdlist[ch - 1]; + int (*func)() = rcmdlist[ch - 1].func; + if(rcmdlist[ch - 1].needitem && locmem->crs_ln == 0) + break; if (func != NULL){ num = locmem->crs_ln - bottom_line; |