From 591928fc4b538506ce6c61906fa360c6ecc8e47a Mon Sep 17 00:00:00 2001 From: Henning Koehler Date: Tue, 20 Mar 2018 12:58:02 +1300 Subject: [PATCH] fixed bug introduced in last CAddInfo fix --- lib/HeroBonus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/HeroBonus.cpp b/lib/HeroBonus.cpp index c42816ba7..111a1b4b1 100644 --- a/lib/HeroBonus.cpp +++ b/lib/HeroBonus.cpp @@ -180,7 +180,7 @@ bool CAddInfo::operator!=(si32 value) const si32 & CAddInfo::operator[](size_type pos) { - if(pos <= size()) + if(pos >= size()) resize(pos + 1, CAddInfo::NONE); return vector::operator[](pos); }