station_cmd.c
changeset 2737 f16e0a808897
parent 2690 2f810b43cb7f
child 2752 b5fe5a7e6282
--- a/station_cmd.c	Sat Dec 10 11:16:45 2005 +0000
+++ b/station_cmd.c	Sat Dec 10 12:05:39 2005 +0000
@@ -810,7 +810,7 @@
 			}
 		} else {
 			ret = DoCommandByTile(tile_cur, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
-			if (ret == CMD_ERROR) return CMD_ERROR;
+			if (CmdFailed(ret)) return CMD_ERROR;
 			cost += ret;
 		}
 	END_TILE_LOOP(tile_cur, w, h, tile)
@@ -1390,7 +1390,7 @@
 		return CMD_ERROR;
 
 	cost = CheckFlatLandBelow(tile, 1, 1, flags, 1 << p1, NULL);
-	if (cost == CMD_ERROR) return CMD_ERROR;
+	if (CmdFailed(cost)) return CMD_ERROR;
 
 	st = GetStationAround(tile, 1, 1, -1);
 	if (st == CHECK_STATIONS_ERR) return CMD_ERROR;