summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-05 01:56:23 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-05 01:56:23 +0300
commit2d1f3a6cc1b382da4376ff87268ba9b84f07ba1c (patch)
treeccfc2bb2b5580775ea334bac62828f7261557f64 /src
parent8ebce1292ef72c62b3757ff81f5c2b1a392accc7 (diff)
downloadplus-2d1f3a6cc1b382da4376ff87268ba9b84f07ba1c.tar.gz
plus-2d1f3a6cc1b382da4376ff87268ba9b84f07ba1c.tar.bz2
plus-2d1f3a6cc1b382da4376ff87268ba9b84f07ba1c.tar.xz
plus-2d1f3a6cc1b382da4376ff87268ba9b84f07ba1c.zip
Add missing check into function recalcSpritesOrder.
Diffstat (limited to 'src')
-rw-r--r--src/being/being.cpp7
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)
{