diff --git a/src/news_item.c b/src/news_item.c index cc95a0dfcb..01f5e38d64 100644 --- a/src/news_item.c +++ b/src/news_item.c @@ -252,7 +252,7 @@ void news_item_add_to_queue(uint8 type, rct_string_id string_id, uint32 assoc) // find first open slot while (newsItem->type != NEWS_ITEM_NULL) { - if (newsItem + sizeof(newsItem) >= (rct_news_item*)0x13CB1CC) + if (newsItem + 1 >= (rct_news_item*)0x13CB1CC) news_item_close_current(); else newsItem++; diff --git a/src/window.c b/src/window.c index 12b6614716..6e795d7a85 100644 --- a/src/window.c +++ b/src/window.c @@ -234,7 +234,7 @@ static int window_wheel_input(rct_window *w, int wheel) continue; // Originally always checked first scroll view, bug maybe? - scroll = &w->scrolls[i * sizeof(rct_scroll)]; + scroll = &w->scrolls[i]; if (scroll->flags & (HSCROLLBAR_VISIBLE | VSCROLLBAR_VISIBLE)) { window_scroll_wheel_input(w, i, wheel); return 1; @@ -308,7 +308,7 @@ static void window_all_wheel_input() if (widgetIndex != -1) { widget = &w->widgets[widgetIndex]; if (widget->type == WWT_SCROLL) { - scroll = &w->scrolls[RCT2_GLOBAL(0x01420075, uint8) * sizeof(rct_scroll)]; + scroll = &w->scrolls[RCT2_GLOBAL(0x01420075, uint8)]; if (scroll->flags & (HSCROLLBAR_VISIBLE | VSCROLLBAR_VISIBLE)) { window_scroll_wheel_input(w, window_get_scroll_index(w, widgetIndex), wheel); return;