summaryrefslogtreecommitdiff
path: root/src/player_face.h
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-10-16 20:59:53 +0000
committerglx <glx@openttd.org>2007-10-16 20:59:53 +0000
commitc0e5ca11dcca0ece6813c904886b1b78fb9399ce (patch)
tree1f5470600cd543c820d84abd44ed8ad7a4494c05 /src/player_face.h
parent389391f9ece8776a7148dcda3f404c7e8a627c00 (diff)
downloadopenttd-c0e5ca11dcca0ece6813c904886b1b78fb9399ce.tar.xz
(svn r11278) -Fix [FS#1342] (r11269): modulo result can be negative for signed int
Diffstat (limited to 'src/player_face.h')
-rw-r--r--src/player_face.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/player_face.h b/src/player_face.h
index 9918fa578..471522223 100644
--- a/src/player_face.h
+++ b/src/player_face.h
@@ -196,7 +196,7 @@ static inline void RandomPlayerFaceBits(PlayerFace &pf, GenderEthnicity ge, bool
pf = Random(); // random all player face bits
/* scale ge: 0 == GE_WM, 1 == GE_WF, 2 == GE_BM, 3 == GE_BF (and maybe in future: ...) */
- ge = (GenderEthnicity)(ge % GE_END);
+ ge = (GenderEthnicity)((uint)ge % GE_END);
/* set the gender (and ethnicity) for the new player face */
if (adv) {