diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-13 12:49:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-13 12:49:11 +0300 |
commit | c4cef10f92a8ff3fc668e0644d38744dccd06392 (patch) | |
tree | 048f4ac482571c5a424819d3e4507f67d21b8409 /src/gui/windows | |
parent | f0b7627b7d88c1d5bb484961377114b210c8dd53 (diff) | |
download | manaplus-c4cef10f92a8ff3fc668e0644d38744dccd06392.tar.gz manaplus-c4cef10f92a8ff3fc668e0644d38744dccd06392.tar.bz2 manaplus-c4cef10f92a8ff3fc668e0644d38744dccd06392.tar.xz manaplus-c4cef10f92a8ff3fc668e0644d38744dccd06392.zip |
Fix signed/unsigned type for some vars.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 02ff66354..ddd6ac873 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -166,13 +166,23 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, maxHairStyle = mPlayer->getNumOfHairstyles(); if (maxHairStyle) - mHairStyle = (rand() % maxHairStyle) + minHairStyle; + { + mHairStyle = (static_cast<unsigned int>(rand()) + % maxHairStyle) + minHairStyle; + } else + { mHairStyle = 0; + } if (maxHairColor) - mHairColor = (rand() % maxHairColor) + minHairColor; + { + mHairColor = (static_cast<unsigned int>(rand()) + % maxHairColor) + minHairColor; + } else + { mHairColor = 0; + } mNameField->setMaximum(24); |