summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-14 18:14:55 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-14 18:14:55 +0800
commit3b920f88afea0e1bd107610afd21cf21622b0209 (patch)
treed3e411d0d21ec42b847b1ab02de9f8ad84cd0281 /mbbsd/mbbsd.c
parent30aaf378e0410c941dd7d7043aac0505ef44e2e1 (diff)
downloadpttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar.gz
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar.bz2
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar.lz
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar.xz
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar.zst
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.zip
fix bugs
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@25 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 3a38aabb..975e2b3c 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1,4 +1,4 @@
-/* $Id: mbbsd.c,v 1.6 2002/03/14 08:17:45 in2 Exp $ */
+/* $Id: mbbsd.c,v 1.7 2002/03/14 10:14:55 in2 Exp $ */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -443,8 +443,9 @@ write_request (int sig)
watermode == -1 ){ /* 不在回水球模式 */
do{
add_history(&currutmp->msgs[0]);
- for (i = 0; i < currutmp->msgcount; i++)
- currutmp->msgs[i] = currutmp->msgs[i + 1];
+ if( currutmp->msgcount-- )
+ for (i = 0; i < currutmp->msgcount; i++)
+ currutmp->msgs[i] = currutmp->msgs[i + 1];
}
while (currutmp->msgcount);
currutmp->msgcount = 0;