From 2d4c4ece8a1daadbc89d7d2db842201e08f989ab Mon Sep 17 00:00:00 2001 From: titiger Date: Tue, 16 Dec 2014 01:50:12 +0100 Subject: [PATCH] fixed missing cast found by Coverity CID 1232665 --- source/glest_game/game/commander.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glest_game/game/commander.cpp b/source/glest_game/game/commander.cpp index 4890cd69..b1e1e44c 100644 --- a/source/glest_game/game/commander.cpp +++ b/source/glest_game/game/commander.cpp @@ -687,7 +687,7 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const { // If > 50% of team vote yes, switch th eplayers team if(newTeamTotalMemberCount > 0 && newTeamVotedYes > 0 && - newTeamVotedYes / newTeamTotalMemberCount > 0.5) { + static_cast(newTeamVotedYes) / static_cast(newTeamTotalMemberCount) > 0.5) { Faction *faction = world->getFaction(factionIndex); int oldTeam = faction->getTeam(); faction->setTeam(vote->newTeam);