diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-05 01:56:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-05 01:56:23 +0300 |
commit | 2d1f3a6cc1b382da4376ff87268ba9b84f07ba1c (patch) | |
tree | ccfc2bb2b5580775ea334bac62828f7261557f64 /src/being/being.cpp | |
parent | 8ebce1292ef72c62b3757ff81f5c2b1a392accc7 (diff) | |
download | plus-2d1f3a6cc1b382da4376ff87268ba9b84f07ba1c.tar.gz plus-2d1f3a6cc1b382da4376ff87268ba9b84f07ba1c.tar.bz2 plus-2d1f3a6cc1b382da4376ff87268ba9b84f07ba1c.tar.xz plus-2d1f3a6cc1b382da4376ff87268ba9b84f07ba1c.zip |
Add missing check into function recalcSpritesOrder.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index b1ca910e0..76b9de904 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -96,6 +96,7 @@ #include "gui/widgets/tabs/chat/langtab.h" +#include "utils/checkutils.h" #include "utils/delete2.h" #include "utils/files.h" #include "utils/gettext.h" @@ -3307,7 +3308,9 @@ void Being::recalcSpritesOrder() restrict2 updatedSprite[slot] = false; } - const size_t spriteIdSize = mSpriteIDs.size(); + size_t spriteIdSize = mSpriteIDs.size(); + if (reportTrue(spriteIdSize > 20)) + spriteIdSize = 20; for (size_t slot = 0; slot < sz; slot ++) { @@ -3555,7 +3558,7 @@ void Being::recalcSpritesOrder() restrict2 } } } - for (unsigned slot = 0; slot < spriteIdSize; slot ++) + for (size_t slot = 0; slot < spriteIdSize; slot ++) { if (mSpriteHide[slot] == 0) { |