summaryrefslogtreecommitdiffstats
path: root/mbbsd/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/read.c')
-rw-r--r--mbbsd/read.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c
index eaff5ed8..8074c71b 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -162,16 +162,19 @@ int
TagPruner(int bid)
{
boardheader_t *bp;
- assert(bid>0);
- bp = getbcache(bid);
- if (strcmp(bp->brdname, "Security") == 0)
- return DONOTHING;
+ assert(bid >= 0); /* bid == 0 means in mailbox */
+ if (bid){
+ bp = getbcache(bid);
+ if (strcmp(bp->brdname, "Security") == 0)
+ return DONOTHING;
+ }
if (TagNum && ((currstat != READING) || (currmode & MODE_BOARD))) {
if (tolower(getans("刪除所有標記[N]?")) != 'y')
return FULLUPDATE;
delete_range(currdirect, 0, 0);
TagNum = 0;
- setbtotal(bid);
+ if (bid)
+ setbtotal(bid);
return NEWDIRECT;
}
return DONOTHING;