Fix release builds with -Warray-bounds enabled

This commit is contained in:
Michał Janiszewski 2016-10-01 14:50:05 +02:00 committed by Ted John
parent 46cf298e6e
commit 3f767ed8ff
1 changed files with 3 additions and 1 deletions

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