diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/cache.c | 7 | ||||
-rw-r--r-- | mbbsd/mail.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 90b73ab8..4369c9f1 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -494,8 +494,11 @@ static int cmpboardclass(const void * i, const void * j) { boardheader_t *brd1 = &bcache[*(int*)i], *brd2 = &bcache[*(int*)j]; - return (strncmp(brd1->title, brd2->title, 4) << 8) + - strcasecmp(brd1->brdname, brd2->brdname); + int cmp; + + cmp=strncmp(brd1->title, brd2->title, 4); + if(cmp!=0) return cmp; + return strcasecmp(brd1->brdname, brd2->brdname); } diff --git a/mbbsd/mail.c b/mbbsd/mail.c index 6657f6a3..997f1d0f 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -426,7 +426,7 @@ multi_send(char *title) reciper = 1; fp = fopen(quote_file, "r"); assert(fp); - while (fgets(genbuf, 256, fp)) { + while (fgets(genbuf, sizeof(genbuf), fp)) { if (strncmp(genbuf, "กฐ ", 3)) { if (listing) break; |