Use Q_strncpyz in G_AddRandomBot

This commit is contained in:
Jeremy Davis 2013-02-02 21:58:01 -06:00 committed by Zack Middleton
parent 9c741f95ea
commit 617107429d

View file

@ -288,8 +288,7 @@ void G_AddRandomBot( int team ) {
if (team == TEAM_RED) teamstr = "red";
else if (team == TEAM_BLUE) teamstr = "blue";
else teamstr = "";
strncpy(netname, value, sizeof(netname)-1);
netname[sizeof(netname)-1] = '\0';
Q_strncpyz(netname, value, sizeof(netname));
Q_CleanStr(netname);
trap_SendConsoleCommand( EXEC_INSERT, va("addbot %s %f %s %i\n", netname, skill, teamstr, 0) );
return;