1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 19:43:06 +01:00

Fix misc scenery tab. Issue due to accessing invalid memory

This commit is contained in:
Duncan Frost
2015-03-05 19:29:38 +00:00
parent 7a4e735434
commit 8cf3eebf9d

View File

@@ -222,7 +222,7 @@ void init_scenery_entry(rct_scenery_entry *sceneryEntry, int index, uint8 scener
* rct2: 0x006DFA00
*/
void init_scenery() {
bool enabledScenerySets[0x13] = { false };
bool enabledScenerySets[0x14] = { false };
for (int scenerySetIndex = 0; scenerySetIndex < 0x14; scenerySetIndex++) {
window_scenery_tab_entries[scenerySetIndex][0] = -1;
@@ -345,7 +345,7 @@ void init_scenery() {
uint32 tabIndex = tabIndexes[i];
rct_widget* tabWidget = &window_scenery_widgets[tabIndex + WIDX_SCENERY_TAB_1];
if (left != 3 || tabIndex == 0x13) {
if (left != 3 || tabIndex != 0x13) {
if (window_scenery_tab_entries[tabIndex][0] == -1)
continue;