summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/player.cpp b/src/player.cpp
index c9d1e683..5fb5ffe9 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -160,6 +160,7 @@ void Player::setGender(int gender)
void Player::setHairStyle(int style, int color)
{
style = style < 0 ? mHairStyle : style % mNumberOfHairstyles;
+ color = color < 0 ? mHairColor : color % ColorDB::size();
if (style == mHairStyle && color == mHairColor) return;
Being::setHairStyle(style, color);