osezer patch 007
authorDan Olson <theoddone33@icculus.org>
Wed, 23 Apr 2008 10:26:05 +0000 (03:26 -0700)
committerDan Olson <theoddone33@icculus.org>
Wed, 23 Apr 2008 10:26:05 +0000 (03:26 -0700)
P_SetMessage(), P_SetYellowMessage(): fixed out of bound arrays.

base/p_inter.c

index 625baf0..89d1c3e 100644 (file)
@@ -78,8 +78,8 @@ void P_SetMessage(player_t *player, char *message, boolean ultmsg)
        }
        if(strlen(message) > 79)
        {
-               memcpy(player->message, message, 80);
-               player->message[80] = 0;
+               memcpy(player->message, message, 79);
+               player->message[79] = 0;
        }
        else
        {
@@ -114,8 +114,8 @@ void P_SetYellowMessage(player_t *player, char *message, boolean ultmsg)
        }
        if(strlen(message) > 79)
        {
-               memcpy(player->message, message, 80);
-               player->message[80] = 0;
+               memcpy(player->message, message, 79);
+               player->message[79] = 0;
        }
        else
        {