diff options
author | darkvater <darkvater@openttd.org> | 2005-01-30 18:51:08 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2005-01-30 18:51:08 +0000 |
commit | 55e1eab1a212108d5aed57ffe0b98146f52d430c (patch) | |
tree | 20759341a92b9f07f715884a092e2aa110489633 /ship_cmd.c | |
parent | e3287ad30336955b4d84c8fa55002a4e6cb30e1d (diff) | |
download | openttd-55e1eab1a212108d5aed57ffe0b98146f52d430c.tar.xz |
(svn r1739) - Fix: type checking when selling vehicles (TrueLight)
Diffstat (limited to 'ship_cmd.c')
-rw-r--r-- | ship_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ship_cmd.c b/ship_cmd.c index c85377187..0bab059ba 100644 --- a/ship_cmd.c +++ b/ship_cmd.c @@ -919,7 +919,7 @@ int32 CmdSellShip(int x, int y, uint32 flags, uint32 p1, uint32 p2) v = GetVehicle(p1); - if (!CheckOwnership(v->owner)) + if (v->type != VEH_Ship || !CheckOwnership(v->owner)) return CMD_ERROR; if (!IsShipDepotTile(v->tile) || v->u.road.state != 0x80 || !(v->vehstatus&VS_STOPPED)) |