From 40fd4377b0d2dbd7b6d3d0d3aa792fa7b1ec3984 Mon Sep 17 00:00:00 2001 From: tron Date: Fri, 3 Mar 2006 19:42:09 +0000 Subject: (svn r3747) Change HASBIT() to return 0/1 instead of 0/value of tested bit, because the name suggests it does the former and current behavior broke in some places in very subtle ways (for example HASBIT(x, 0) != HASBIT(y, 1) doesn't work, returning a bool after HASBIT(x, 9) neither) --- vehicle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vehicle.c') diff --git a/vehicle.c b/vehicle.c index 0074a0355..f6543c84a 100644 --- a/vehicle.c +++ b/vehicle.c @@ -688,7 +688,7 @@ bool CanFillVehicle(Vehicle *v) bool CanRefitTo(EngineID engine_type, CargoID cid_to) { CargoID cid = _global_cargo_id[_opt_ptr->landscape][cid_to]; - return HASBIT(_engine_info[engine_type].refit_mask, cid) != 0; + return HASBIT(_engine_info[engine_type].refit_mask, cid); } static void DoDrawVehicle(const Vehicle *v) -- cgit v1.2.3-54-g00ecf