summaryrefslogtreecommitdiffstats
path: root/mbbsd/screen.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-16 19:53:54 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-16 19:53:54 +0800
commit376f2d4fa927c6c521bbbe1f9b7c6df0ecdf1157 (patch)
tree538869be0f56b897c72f380aa8bd2118f43a1af4 /mbbsd/screen.c
parent09041d65c03b9551bd4de24c73c655193fe8e54b (diff)
downloadpttbbs-376f2d4fa927c6c521bbbe1f9b7c6df0ecdf1157.tar
pttbbs-376f2d4fa927c6c521bbbe1f9b7c6df0ecdf1157.tar.gz
pttbbs-376f2d4fa927c6c521bbbe1f9b7c6df0ecdf1157.tar.bz2
pttbbs-376f2d4fa927c6c521bbbe1f9b7c6df0ecdf1157.tar.lz
pttbbs-376f2d4fa927c6c521bbbe1f9b7c6df0ecdf1157.tar.xz
pttbbs-376f2d4fa927c6c521bbbe1f9b7c6df0ecdf1157.tar.zst
pttbbs-376f2d4fa927c6c521bbbe1f9b7c6df0ecdf1157.zip
code clean up
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@601 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/screen.c')
-rw-r--r--mbbsd/screen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mbbsd/screen.c b/mbbsd/screen.c
index eefdbbea..23aa9e71 100644
--- a/mbbsd/screen.c
+++ b/mbbsd/screen.c
@@ -1,4 +1,4 @@
-/* $Id: screen.c,v 1.13 2002/09/11 10:33:11 kcwu Exp $ */
+/* $Id: screen.c,v 1.14 2003/01/16 11:53:54 kcwu Exp $ */
#include "bbs.h"
#ifdef SUPPORT_GB
@@ -379,7 +379,7 @@ outc(unsigned char ch)
if (ch == 'm') {
buf[p++] = '\0';
parsecolor(buf);
- } else if ((p < 24) && (not_alpha(ch))) {
+ } else if ((p < sizeof(buf)) && (not_alpha(ch))) {
buf[p++] = ch;
return;
}
@@ -387,8 +387,8 @@ outc(unsigned char ch)
outch('');
outch('[');
- for (i = 0; (p = buf[i]); i++)
- outch(p);
+ for (i = 0; buf[i]; i++)
+ outch(buf[i]);
outch(ch);
}
p = 0;