diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-29 12:07:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-29 12:07:58 +0300 |
commit | a4d15a399a806be0e87a52508e05f07219b26c65 (patch) | |
tree | 1cf72137c67182d89d4f6c594397b5eec4d2d2ef /src/gui/widgets | |
parent | 6bf17889536c4c3e09bfc2089e0fa1123d8d2378 (diff) | |
download | mv-a4d15a399a806be0e87a52508e05f07219b26c65.tar.gz mv-a4d15a399a806be0e87a52508e05f07219b26c65.tar.bz2 mv-a4d15a399a806be0e87a52508e05f07219b26c65.tar.xz mv-a4d15a399a806be0e87a52508e05f07219b26c65.zip |
fix crach in tmw like servers on player selection dialog.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/characterviewnormal.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/characterviewnormal.cpp b/src/gui/widgets/characterviewnormal.cpp index 920fde61c..7422f25d5 100644 --- a/src/gui/widgets/characterviewnormal.cpp +++ b/src/gui/widgets/characterviewnormal.cpp @@ -68,6 +68,7 @@ void CharacterViewNormal::show(const int i) void CharacterViewNormal::resize() { + const int sz = static_cast<signed>(mCharacterEntries->size()); const CharacterDisplay *const firtChar = (*mCharacterEntries)[0]; int y = 0; const int width = firtChar->getWidth(); @@ -76,7 +77,7 @@ void CharacterViewNormal::resize() (*mCharacterEntries)[f]->setPosition(f * width, y); y += height; - for (int f = 5; f < 10; f ++) + for (int f = 5; f < sz; f ++) (*mCharacterEntries)[f]->setPosition((f - 5) * width, y); } |