Fixed ChatPrintf and CenterPrintf safety

This commit is contained in:
WPMGPRoSToTeMa 2017-01-25 21:28:20 +03:00
commit 7b27754858
2 changed files with 3 additions and 2 deletions

View file

@ -81,6 +81,7 @@ void Engine::ChatPrintf (const char *fmt, ...)
MESSAGE_BEGIN (MSG_BROADCAST, FindMessageId (NETMSG_TEXTMSG));
WRITE_BYTE (HUD_PRINTTALK);
WRITE_STRING ("%s");
WRITE_STRING (string);
MESSAGE_END ();
}
@ -101,8 +102,7 @@ void Engine::CenterPrintf (const char *fmt, ...)
}
strcat (string, "\n");
MESSAGE_BEGIN (MSG_BROADCAST, FindMessageId (NETMSG_TEXTMSG));
WRITE_BYTE (HUD_PRINTCENTER);
MESSAGE_BEGIN (MSG_BROADCAST, SVC_CENTERPRINT);
WRITE_STRING (string);
MESSAGE_END ();
}