Skip to content

Commit

Permalink
Use Q_strncpyz in G_AddRandomBot
Browse files Browse the repository at this point in the history
  • Loading branch information
ensiform authored and zturtleman committed Feb 3, 2013
1 parent 9c741f9 commit 6171074
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions code/game/g_bot.c
Expand Up @@ -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;
Expand Down

0 comments on commit 6171074

Please sign in to comment.