diff --git a/code/game/g_bot.c b/code/game/g_bot.c index ae4c3acb..6ee369a3 100644 --- a/code/game/g_bot.c +++ b/code/game/g_bot.c @@ -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;