summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-25 13:57:19 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-25 14:47:37 +0300
commit5da20a82b1a4d1a4bab77fad0aa73244a53073b1 (patch)
treea4c76700a338ae8205068a60ae545a843b57a396 /src/gui
parent2e04b98283f7dfa34fc2834d264670a4792e3720 (diff)
downloadplus-5da20a82b1a4d1a4bab77fad0aa73244a53073b1.tar.gz
plus-5da20a82b1a4d1a4bab77fad0aa73244a53073b1.tar.bz2
plus-5da20a82b1a4d1a4bab77fad0aa73244a53073b1.tar.xz
plus-5da20a82b1a4d1a4bab77fad0aa73244a53073b1.zip
fix previous hair style button in char creation dialog.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/charcreatedialog.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index 5dc856da5..33806753d 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -503,9 +503,10 @@ void CharCreateDialog::setFixedGender(const bool fixed, const Gender gender)
void CharCreateDialog::updateHair()
{
- mHairStyle %= Being::getNumOfHairstyles();
- if (mHairStyle < 0)
- mHairStyle += Being::getNumOfHairstyles();
+ if (mHairStyle <= 0)
+ mHairStyle = Being::getNumOfHairstyles() - 1;
+ else
+ mHairStyle %= Being::getNumOfHairstyles();
if (mHairStyle < static_cast<signed>(minHairStyle)
|| mHairStyle > static_cast<signed>(maxHairStyle))
{