]> git.pond.sub.org Git - empserver/commit
buy: Fix bogus error when lot gets reused at the last prompt
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 12 Jan 2021 20:42:42 +0000 (21:42 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 23 Jan 2021 07:39:14 +0000 (08:39 +0100)
commita021a20e551f1f0ab05ad6da336dc28c83a10075
tree92c13fb0beaf1cd2c7cd8755f0fe690ff7638ded
parent1b677a4578ab5c5b8a40ff5101bee76ecef6f89e
buy: Fix bogus error when lot gets reused at the last prompt

When the lot being bid for goes away and gets reused while the player
is at the prompt for the destination sector, comm.com_amount gets
stale.  We use it before we detect the change and fail the command
This can lead to a misleading ""You don't have that much to spend!"
error.  Messed up when the code was fixed to deal with lot changes in
4.0.2.

Fix by checking for lot change earlier.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/buy.c