diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-30 12:10:06 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-30 12:10:06 +0800 |
commit | fa58d071ff9032f6efa7316e724d6c49f78b7abe (patch) | |
tree | feef95f17c1e9a82af7113f48d99c6d1d289f17b | |
parent | 4054fc4fc42e2cc44539ea0e5279f7dc80e7f5c7 (diff) | |
download | pttbbs-fa58d071ff9032f6efa7316e724d6c49f78b7abe.tar pttbbs-fa58d071ff9032f6efa7316e724d6c49f78b7abe.tar.gz pttbbs-fa58d071ff9032f6efa7316e724d6c49f78b7abe.tar.bz2 pttbbs-fa58d071ff9032f6efa7316e724d6c49f78b7abe.tar.lz pttbbs-fa58d071ff9032f6efa7316e724d6c49f78b7abe.tar.xz pttbbs-fa58d071ff9032f6efa7316e724d6c49f78b7abe.tar.zst pttbbs-fa58d071ff9032f6efa7316e724d6c49f78b7abe.zip |
a little buf of 'S'
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1897 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/read.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c index 32ac0c05..ea3c6305 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -334,7 +334,7 @@ select_read(keeploc_t * locmem, int sr_mode) fileheader_t fhs[READSIZE]; char newdirect[MAXPATHLEN]; char keyword[TTLEN + 1] = ""; - char genbuf[MAXPATHLEN], *p; + char genbuf[MAXPATHLEN], *p = strstr(currdirect, "SR"); static int _mode = 0; int len, fd, fr, i, count=0, reference = 0; @@ -358,13 +358,14 @@ select_read(keeploc_t * locmem, int sr_mode) } else { - if(_mode & sr_mode & (RS_TITLE | RS_NEWPOST | RS_MARK)) return DONOTHING; - // Ptt: only once for these two modes. + if(p && _mode & sr_mode & (RS_TITLE | RS_NEWPOST | RS_MARK)) + return DONOTHING; + // Ptt: only once for these modes. if(sr_mode & RS_TITLE) strcpy(keyword, subject(fh->title)); } - if((p = strstr(currdirect, "SR"))==NULL) + if(p == NULL) _mode = sr_mode; else _mode |= sr_mode; |