1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

widget_index is sint16, make sure the check is valid (#3335)

This commit is contained in:
janisozaur
2016-04-20 19:08:05 +02:00
committed by Ted John
parent 0286efc546
commit e9bf2a742f

View File

@@ -1803,7 +1803,7 @@ void tool_cancel()
// Reset map selection
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) = 0;
if (gCurrentToolWidget.widget_index != 0xFFFF) {
if (gCurrentToolWidget.widget_index != -1) {
// Invalidate tool widget
widget_invalidate_by_number(
gCurrentToolWidget.window_classification,