From 8e54e9809b9961330bf4198cdb35461c9e3c3397 Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Mon, 6 Jul 2009 22:03:39 +0000 Subject: [PATCH] Fixing warnings --- reaction/code/game/ai_cmd.c | 2 +- reaction/code/game/ai_team.c | 2 +- reaction/code/game/g_combat.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reaction/code/game/ai_cmd.c b/reaction/code/game/ai_cmd.c index b274c3ce..c4a1dba6 100644 --- a/reaction/code/game/ai_cmd.c +++ b/reaction/code/game/ai_cmd.c @@ -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 { diff --git a/reaction/code/game/ai_team.c b/reaction/code/game/ai_team.c index 7fb79ece..c2ba535e 100644 --- a/reaction/code/game/ai_team.c +++ b/reaction/code/game/ai_team.c @@ -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; diff --git a/reaction/code/game/g_combat.c b/reaction/code/game/g_combat.c index 889a5be4..d58a9627 100644 --- a/reaction/code/game/g_combat.c +++ b/reaction/code/game/g_combat.c @@ -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) {