From 6de86720b2f618bbed633d62da5e077279706706 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 18 Apr 2010 18:36:55 +0200 Subject: [PATCH] Fix fly and drop to report discarded cargo items correctly When d of n cargo items are discarded for want of space, pln_dropoff() reported -d items discarded and -d items unloaded. Already broken in BSD Empire 1.1. --- src/lib/subs/plnsub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/subs/plnsub.c b/src/lib/subs/plnsub.c index 5e11ec05..0367d77d 100644 --- a/src/lib/subs/plnsub.c +++ b/src/lib/subs/plnsub.c @@ -305,8 +305,8 @@ pln_dropoff(struct emp_qelem *list, struct ichrstr *ip, coord tx, coord ty, } there += amt; if (there > max) { - pr("%d excess %s discarded\n", max - there, ip->i_name); - amt = max - there; + pr("%d excess %s discarded\n", there - max, ip->i_name); + amt -= there - max; there = max; } pr("%d %s landed safely", amt, ip->i_name);