summaryrefslogtreecommitdiffstats
path: root/mbbsd/chat.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-02 21:11:54 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-02 21:11:54 +0800
commitac7f1019352e685b8883c96d1cc5b4d3b4904cdb (patch)
tree2b342344105c4cb9ecdf035d25a3a86c12fcf354 /mbbsd/chat.c
parent8035884632b7a12f04ce288986c1a8b8632beeb1 (diff)
downloadpttbbs-ac7f1019352e685b8883c96d1cc5b4d3b4904cdb.tar
pttbbs-ac7f1019352e685b8883c96d1cc5b4d3b4904cdb.tar.gz
pttbbs-ac7f1019352e685b8883c96d1cc5b4d3b4904cdb.tar.bz2
pttbbs-ac7f1019352e685b8883c96d1cc5b4d3b4904cdb.tar.lz
pttbbs-ac7f1019352e685b8883c96d1cc5b4d3b4904cdb.tar.xz
pttbbs-ac7f1019352e685b8883c96d1cc5b4d3b4904cdb.tar.zst
pttbbs-ac7f1019352e685b8883c96d1cc5b4d3b4904cdb.zip
- cache angel data to speed up angel query
- stop GoToNewHand() board because many people get confused and then post to wrong place. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4066 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chat.c')
-rw-r--r--mbbsd/chat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/chat.c b/mbbsd/chat.c
index 6623fbc2..1bc12472 100644
--- a/mbbsd/chat.c
+++ b/mbbsd/chat.c
@@ -93,7 +93,7 @@ chat_recv(struct ChatBuf *cb, int fd, char *chatroom, char *chatid, size_t chati
clrtoeol();
break;
case 'r':
- strlcpy(chatroom, bptr + 2, IDLEN);
+ strlcpy(chatroom, bptr + 2, sizeof(chatroom));
break;
case 't':
move(0, 0);
@@ -267,7 +267,7 @@ static time4_t lastEnter = 0;
int
t_chat(void)
{
- char chatroom[IDLEN];/* Chat-Room Name */
+ char chatroom[IDLEN+1];/* Chat-Room Name */
char inbuf[80], chatid[20], lastcmd[MAXLASTCMD][80], *ptr = "";
struct sockaddr_in sin;
int cfd, cmdpos, ch;