From 9d5369ff1efc17a53f13c11dd95ac261f3df74c8 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 6 May 2017 16:48:32 +0200 Subject: [PATCH] coverity: unintended integer division --- src/economy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/economy.c b/src/economy.c index 5f62527ea..0bc056b56 100644 --- a/src/economy.c +++ b/src/economy.c @@ -2944,8 +2944,8 @@ static void peasant_taxes(region * r) level = buildingeffsize(b, false); if (level > 0) { - double taxfactor = money * level / building_taxes(b); - double morale = money * region_get_morale(r) / MORALE_TAX_FACTOR; + double taxfactor = (double)money * level / building_taxes(b); + double morale = (double)money * region_get_morale(r) / MORALE_TAX_FACTOR; if (taxfactor > morale) { taxfactor = morale; }