mirror of https://github.com/OpenTTD/OpenTTD
(svn r11278) -Fix [FS#1342] (r11269): modulo result can be negative for signed int
parent
28050e6e6d
commit
440fa08669
|
@ -196,7 +196,7 @@ static inline void RandomPlayerFaceBits(PlayerFace &pf, GenderEthnicity ge, bool
|
||||||
pf = Random(); // random all player face bits
|
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: ...) */
|
/* 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 */
|
/* set the gender (and ethnicity) for the new player face */
|
||||||
if (adv) {
|
if (adv) {
|
||||||
|
|
Loading…
Reference in New Issue