Don't add null if the message is already null-terminated. Fixes #1000

This commit is contained in:
Jittapan Pluemsumran
2016-03-03 11:33:39 +07:00
parent 033cdba82b
commit e9c9fd65d4

View File

@@ -9803,7 +9803,10 @@ static bool clif_process_message(struct map_session_data* sd, int format, char**
}
#if PACKETVER >= 20151001
message[messagelen++] = '\0';
if (message[messagelen-1] != '\0')
{
message[messagelen++] = '\0';
}
#endif
// the declared length must match real length