Fix release builds with -Warray-bounds enabled

This commit is contained in:
Michał Janiszewski authored and Ted John committed 2016-10-01 13:50:05 +01:00
1 parent 46cf298e6e
commit 3f767ed8ff
1 file changed
+3 -1
+3 -1
View File
@@ -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