mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
(svn r18469) -Fix (r17139): possible invalid reads when listing content on the console
This commit is contained in:
parent
8d8207e285
commit
1c3a99fe4c
@ -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 };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user