From 4d7eba01353c0b1b9b5351aef99383561ed414ba Mon Sep 17 00:00:00 2001 From: mathusummut Date: Sun, 3 Feb 2019 18:16:25 +0100 Subject: [PATCH] Fixed bug in function --- source/game/gui/selection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/game/gui/selection.cpp b/source/game/gui/selection.cpp index 3609c6b19..1ac820b99 100644 --- a/source/game/gui/selection.cpp +++ b/source/game/gui/selection.cpp @@ -63,10 +63,10 @@ namespace Game { return false; //check if already selected for (int index = 0; index < (int) selectedUnits.size(); ++index) { - if (selectedUnits[index] == unit) { + if (selectedUnits[index] == unit) return true; - } } + return false; } bool Selection::select(Unit *unit, bool addToSelection, bool toggleSelection) {