1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Fix issue with more than two rct_scrolls not working

This commit is contained in:
Sijmen Schoon
2018-08-02 12:49:53 +02:00
committed by Aaron van Geffen
parent 2e64bdbe26
commit 2e95c64a7c

View File

@@ -862,14 +862,12 @@ void widget_scroll_get_part(
rct_window* w, rct_widget* widget, int32_t x, int32_t y, int32_t* output_x, int32_t* output_y, int32_t* output_scroll_area,
int32_t* scroll_id)
{
rct_widget* iterator = w->widgets;
*scroll_id = 0;
while (++iterator != widget)
for (rct_widget* iterator = w->widgets; iterator != widget; iterator++)
{
if (iterator->type == WWT_SCROLL)
{
(*scroll_id)++;
break;
*scroll_id += 1;
}
}