summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-12 21:56:13 +0000
committerrubidium <rubidium@openttd.org>2009-12-12 21:56:13 +0000
commit510f8a912290f9ead3173056d8b3d76f0d51fba5 (patch)
tree09555e1605db708e0616542fa948cd8161b030c5 /src
parentae92fd2865b25fbce4bfa6c3a5e00b4b7dd48930 (diff)
downloadopenttd-510f8a912290f9ead3173056d8b3d76f0d51fba5.tar.xz
(svn r18469) -Fix (r17139): possible invalid reads when listing content on the console
Diffstat (limited to 'src')
-rw-r--r--src/console_cmds.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index b5e7c8273..bb0ae0310 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -1670,7 +1670,8 @@ DEF_CONSOLE_CMD(ConContent)
if (strcasecmp(argv[1], "state") == 0) {
IConsolePrintF(CC_WHITE, "id, type, state, name");
for (ConstContentIterator iter = _network_content_client.Begin(); iter != _network_content_client.End(); iter++) {
- static const char * const types[] = { "Base graphics", "NewGRF", "AI", "AI library", "Scenario", "Heightmap" };
+ static const char * const types[] = { "Base graphics", "NewGRF", "AI", "AI library", "Scenario", "Heightmap", "Base sound" };
+ assert_compile(lengthof(types) == CONTENT_TYPE_END - CONTENT_TYPE_BEGIN);
static const char * const states[] = { "Not selected", "Selected", "Dep Selected", "Installed", "Unknown" };
static const ConsoleColour state_to_colour[] = { CC_COMMAND, CC_INFO, CC_INFO, CC_WHITE, CC_ERROR };