From d8dc8a3257c322e95f22410c3d0808991a66ea1d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 21 May 2006 07:42:53 +0000 Subject: [PATCH] (explore, ask_move_in_off): Compute weight as double, for consistency with similar computations elsewhere. --- src/lib/commands/expl.c | 2 +- src/lib/subs/attsub.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/commands/expl.c b/src/lib/commands/expl.c index d85b586d..07adc860 100644 --- a/src/lib/commands/expl.c +++ b/src/lib/commands/expl.c @@ -132,7 +132,7 @@ explore(void) if (amount <= 0) return RET_SYN; - weight = amount * ip->i_lbs; + weight = (double)amount * ip->i_lbs; /* remove commodities from source sector */ getsect(x, y, &start); amt_src = start.sct_item[vtype]; diff --git a/src/lib/subs/attsub.c b/src/lib/subs/attsub.c index e5d5bbda..d5db3733 100644 --- a/src/lib/subs/attsub.c +++ b/src/lib/subs/attsub.c @@ -2468,7 +2468,7 @@ ask_move_in_off(struct combat *off, struct combat *def) off->troops -= num_mil; put_combat(off); left = num_mil; - weight = num_mil * ichr[I_MILIT].i_lbs; + weight = (double)num_mil * ichr[I_MILIT].i_lbs; if (opt_INTERDICT_ATT && chance(weight / 200.0)) { if (chance(weight / 100.0)) dam +=