mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 20:13:07 +01:00
Fix release builds with -Warray-bounds enabled
This commit is contained in:
committed by
Ted John
parent
46cf298e6e
commit
3f767ed8ff
@@ -419,7 +419,9 @@ static void move_research_item(rct_research_item *beforeItem)
|
||||
rct_window *w;
|
||||
rct_research_item *researchItem, draggedItem;
|
||||
|
||||
if (_editorInventionsListDraggedItem == beforeItem - 1)
|
||||
// We only really care about `_editorInventionsListDraggedItem == beforeItem - 1`,
|
||||
// but this would cause a GCC warning due to -Warray-bounds
|
||||
if (_editorInventionsListDraggedItem < beforeItem)
|
||||
return;
|
||||
|
||||
// Back up the dragged item
|
||||
|
||||
Reference in New Issue
Block a user