From 7ee4c14b05755422a91afec5e5b50b1bab9c2a13 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sat, 30 Sep 2017 00:24:58 +1000 Subject: [PATCH] more work on fixing chat system --- src/chat_system.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/chat_system.c b/src/chat_system.c index 3236701..d852836 100644 --- a/src/chat_system.c +++ b/src/chat_system.c @@ -265,9 +265,8 @@ void chat_system(struct user_record *user) { strncat(partmessage, readbuffer, 1024); strcpy(readbuffer, partmessage); - len = strlen(readbuffer); y = 0; - for (z = 0;z < len; z++) { + for (z = 0;z < strlen(readbuffer); z++) { if (readbuffer[z] != '\n') { message[y] = readbuffer[z]; message[y+1] = '\0';