diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-25 13:57:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-25 14:47:37 +0300 |
commit | 5da20a82b1a4d1a4bab77fad0aa73244a53073b1 (patch) | |
tree | a4c76700a338ae8205068a60ae545a843b57a396 /src/gui/charcreatedialog.cpp | |
parent | 2e04b98283f7dfa34fc2834d264670a4792e3720 (diff) | |
download | mv-5da20a82b1a4d1a4bab77fad0aa73244a53073b1.tar.gz mv-5da20a82b1a4d1a4bab77fad0aa73244a53073b1.tar.bz2 mv-5da20a82b1a4d1a4bab77fad0aa73244a53073b1.tar.xz mv-5da20a82b1a4d1a4bab77fad0aa73244a53073b1.zip |
fix previous hair style button in char creation dialog.
Diffstat (limited to 'src/gui/charcreatedialog.cpp')
-rw-r--r-- | src/gui/charcreatedialog.cpp | 7 |
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)) { |