]> git.pond.sub.org Git - empserver/commit
Fix marking of unused trade slots
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 14 Sep 2008 16:04:32 +0000 (12:04 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 15 Sep 2008 23:40:44 +0000 (19:40 -0400)
commit94a3108b23d23afa8e65aa8c138845cc905c3c28
tree52826b94e32153adf13d8c34d1602e08d1b6b14c
parent69b74bb5ddee6dcd3a4a60892fab14ddc59b8f8c
Fix marking of unused trade slots

Trade code can't quite decide whether negative trd_unitid or zero
trd_owner marks unused slots.  The former is a bad idea, because blank
slots have a zero trd_unitid.

Make sure to zero trd_owner when setting trd_unitid to negative value
in trad() and check_trade().  This fixes recognition of unused slots
in set (broken in commit e16e38df, v4.2.18) and xdump (never worked).
src/lib/commands/trad.c