From ab2893fa41e4a9d33c2c6c3b893c573cb6ac2643 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 3 Aug 2008 17:20:05 -0400 Subject: [PATCH] Fix work command not to spend more mobility than requested Culprit is careless rounding in work(). --- src/lib/commands/work.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/commands/work.c b/src/lib/commands/work.c index 8ab37806..ba9022cf 100644 --- a/src/lib/commands/work.c +++ b/src/lib/commands/work.c @@ -79,7 +79,7 @@ work(void) continue; } eff_amt = MIN(land.lnd_mobil, work_amt); - w = ldround(((double)eff_amt * land.lnd_effic / 600.0), 1); + w = (eff_amt * land.lnd_effic) / 600; if (w < 1) { pr("%s doesn't work enough to change efficiency (try increasing amount)\n", prland(&land));