diff options
author | matthijs <matthijs@openttd.org> | 2006-05-01 09:34:23 +0000 |
---|---|---|
committer | matthijs <matthijs@openttd.org> | 2006-05-01 09:34:23 +0000 |
commit | daef7e410c9f84e36dddd677f4a2e7124ccae9e7 (patch) | |
tree | da7831369495881ba17fb8ab0c61f332499bafee /station_cmd.c | |
parent | 5c677d49f47011769c56c6019d2ae180d852778c (diff) | |
download | openttd-daef7e410c9f84e36dddd677f4a2e7124ccae9e7.tar.xz |
(svn r4640) - Add: IsValidDiagDirection, IsValidDirection and IsValidAxis functions.
- Codechange: Use IsValidDiagDirection() in CmdBuildRoadStop().
Diffstat (limited to 'station_cmd.c')
-rw-r--r-- | station_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/station_cmd.c b/station_cmd.c index e7fcb9ca2..491454573 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -1360,7 +1360,7 @@ int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) bool type = !!p2; /* Saveguard the parameters */ - if (p1 > 3) return CMD_ERROR; + if (!IsValidDiagDirection(p1)) return CMD_ERROR; SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION); |