more work on fixing chat system

This commit is contained in:
Andrew Pamment 2017-09-30 00:24:58 +10:00
parent b7cf0c9497
commit 7ee4c14b05

View File

@ -265,9 +265,8 @@ void chat_system(struct user_record *user) {
strncat(partmessage, readbuffer, 1024); strncat(partmessage, readbuffer, 1024);
strcpy(readbuffer, partmessage); strcpy(readbuffer, partmessage);
len = strlen(readbuffer);
y = 0; y = 0;
for (z = 0;z < len; z++) { for (z = 0;z < strlen(readbuffer); z++) {
if (readbuffer[z] != '\n') { if (readbuffer[z] != '\n') {
message[y] = readbuffer[z]; message[y] = readbuffer[z];
message[y+1] = '\0'; message[y+1] = '\0';