X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fseq_add.c;h=6c99b5d775dcc0fd69ef7ba372b783712824b792;hb=0b81a300d9e7cf78b6bc11d8c870f57fa81fcdc4;hp=38bbdcf69a2ccdd534c6a40a5ea60f4d75d40ab9;hpb=3cc8ed080f6e741b8df04a3ebe764c659e75cb38;p=mmh diff --git a/sbr/seq_add.c b/sbr/seq_add.c index 38bbdcf..6c99b5d 100644 --- a/sbr/seq_add.c +++ b/sbr/seq_add.c @@ -33,14 +33,14 @@ seq_addsel(struct msgs *mp, char *cp, int public, int zero) ** We keep mp->curmsg and cur sequence in sync. ** See seq_list() and seq_init(). */ - if (!strcmp(seq_cur, cp)) + if (strcmp(seq_cur, cp)==0) mp->curmsg = mp->hghsel; /* ** Get the number for this sequence */ for (i = 0; mp->msgattrs[i]; i++) { - if (!strcmp(mp->msgattrs[i], cp)) { + if (strcmp(mp->msgattrs[i], cp)==0) { new_seq = 0; break; } @@ -124,14 +124,14 @@ seq_addmsg(struct msgs *mp, char *cp, int msgnum, int public, int zero) /* ** keep mp->curmsg and msgattrs[] of seq_cur in sync - see seq_list() */ - if (!strcmp(seq_cur, cp)) + if (strcmp(seq_cur, cp)==0) mp->curmsg = msgnum; /* ** Get the number for this sequence */ for (i = 0; mp->msgattrs[i]; i++) { - if (!strcmp(mp->msgattrs[i], cp)) { + if (strcmp(mp->msgattrs[i], cp)==0) { new_seq = 0; break; } @@ -156,7 +156,7 @@ seq_addmsg(struct msgs *mp, char *cp, int msgnum, int public, int zero) ** If sequence is new, or zero flag is set, then first ** clear the bit for this sequence from all messages. */ - if (new_seq || zero) { + if (mp->nummsg>0 && (new_seq || zero)) { for (j = mp->lowmsg; j <= mp->hghmsg; j++) clear_sequence(mp, i, j); }