summaryrefslogtreecommitdiffstats
path: root/mbbsd/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/read.c')
-rw-r--r--mbbsd/read.c9
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;