diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-19 21:14:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-20 13:55:42 +0300 |
commit | 71d2b482d84246b8456ea863f94a9a766d33f197 (patch) | |
tree | 761f5f4e2ba350e056f5e69015a0ae94bb9bf0e5 /src/gui/palette.h | |
parent | 213a21e4c079113e5822d2cf90802d6dcb2cb232 (diff) | |
download | manaplus-71d2b482d84246b8456ea863f94a9a766d33f197.tar.gz manaplus-71d2b482d84246b8456ea863f94a9a766d33f197.tar.bz2 manaplus-71d2b482d84246b8456ea863f94a9a766d33f197.tar.xz manaplus-71d2b482d84246b8456ea863f94a9a766d33f197.zip |
Add missing check in palette class.
Diffstat (limited to 'src/gui/palette.h')
-rw-r--r-- | src/gui/palette.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/palette.h b/src/gui/palette.h index e165e8901..f18e4ed38 100644 --- a/src/gui/palette.h +++ b/src/gui/palette.h @@ -82,7 +82,7 @@ class Palette */ inline const gcn::Color &getColor(int type, int alpha = 255) { - if (type >= static_cast<signed>(mColors.size())) + if (type >= static_cast<signed>(mColors.size()) || type < 0) { logger->log("incorrect color request type: %d from %u", type, static_cast<unsigned int>(mColors.size())); |