From 65429a12c31a74d4cbd266788b635b43fe8eaaa2 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 29 Oct 2015 08:52:51 +0100 Subject: [PATCH] coverity scan CID 22585, 22586: result is not floating point --- src/study.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/study.c b/src/study.c index 3a0f38921..7c968637a 100644 --- a/src/study.c +++ b/src/study.c @@ -505,7 +505,7 @@ static double study_speedup(unit * u, skill_t s, study_rule_t rule) skill *sv = u->skills + i; if (sv->id == s){ learnweeks = sv->level * (sv->level + 1) / 2.0; - if (learnweeks < turn / 3) { + if (learnweeks < turn / 3.0) { return 2.0; } } @@ -517,7 +517,7 @@ static double study_speedup(unit * u, skill_t s, study_rule_t rule) skill *sv = u->skills + i; learnweeks += (sv->level * (sv->level + 1) / 2.0); } - if (learnweeks < turn / 2) { + if (learnweeks < turn / 2.0) { return 2.0; } }