Fixing warnings

This commit is contained in:
Richard Allen 2009-07-06 22:03:39 +00:00
parent 595eaa0ee9
commit 8e54e9809b
3 changed files with 4 additions and 4 deletions

View file

@ -1327,7 +1327,7 @@ void BotMatch_StartTeamLeaderShip(bot_state_t * bs, bot_match_t * match)
//get the team mate that will be the team leader
trap_BotMatchVariable(match, NETNAME, teammate, sizeof(teammate));
strncpy(bs->teamleader, teammate, sizeof(bs->teamleader));
bs->teamleader[sizeof(bs->teamleader)] = '\0';
bs->teamleader[sizeof(bs->teamleader)-1] = '\0';
}
//chats for someone else
else {

View file

@ -1138,7 +1138,7 @@ void BotTeamAI(bot_state_t * bs)
BotSayVoiceTeamOrder(bs, -1, VOICECHAT_STARTLEADER);
ClientName(bs->client, netname, sizeof(netname));
strncpy(bs->teamleader, netname, sizeof(bs->teamleader));
bs->teamleader[sizeof(bs->teamleader)] = '\0';
bs->teamleader[sizeof(bs->teamleader)-1] = '\0';
bs->becometeamleader_time = 0;
}
return;

View file

@ -2042,8 +2042,8 @@ void G_Damage(gentity_t * targ, gentity_t * inflictor, gentity_t * attacker,
// take -= asave;
if (g_debugDamage.integer) {
G_Printf("%i: client:%i health:%i damage:%i armor:%i\n", level.time, targ->s.number,
targ->health, take, asave);
G_Printf("%i: client:%i health:%i damage:%i\n", level.time, targ->s.number,
targ->health, take);
}
// See if it's the player hurting the emeny flag carrier
if (g_gametype.integer == GT_CTF) {