summaryrefslogtreecommitdiff
path: root/src/object_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-10-12 16:31:55 +0000
committerfrosch <frosch@openttd.org>2013-10-12 16:31:55 +0000
commitac599625da28a448a4f9ec655e4767e6436d0e16 (patch)
tree9f9ccc7865a0beeb2a19ddba30a76b8686001fc9 /src/object_cmd.cpp
parent60f483822f07e6b3e0b680ebe9353ccefa9c2c52 (diff)
downloadopenttd-ac599625da28a448a4f9ec655e4767e6436d0e16.tar.xz
(svn r25835) -Change: Increase the total number of object types from 256 to 64000.
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r--src/object_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index e6100c78d..59fc3f5c4 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -205,7 +205,8 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
{
CommandCost cost(EXPENSES_PROPERTY);
- ObjectType type = (ObjectType)GB(p1, 0, 8);
+ ObjectType type = (ObjectType)GB(p1, 0, 16);
+ if (type >= NUM_OBJECTS) return CMD_ERROR;
uint8 view = GB(p2, 0, 2);
const ObjectSpec *spec = ObjectSpec::Get(type);
if (!spec->IsAvailable()) return CMD_ERROR;