summaryrefslogtreecommitdiff
path: root/src/gui/charcreatedialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/charcreatedialog.cpp')
-rw-r--r--src/gui/charcreatedialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index 7c2b0ed9..87be2be3 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -344,8 +344,12 @@ void CharCreateDialog::setFixedGender(bool fixed, Gender gender)
void CharCreateDialog::updateHair()
{
mHairStyle %= Being::getNumOfHairstyles();
+ if (mHairStyle < 0)
+ mHairStyle += Being::getNumOfHairstyles();
mHairColor %= ColorDB::size();
+ if (mHairColor < 0)
+ mHairColor += ColorDB::size();
mPlayer->setSprite(Player::HAIR_SPRITE,
mHairStyle * -1, ColorDB::get(mHairColor));