Mercurial > hg > openttd
changeset 7741:ebb1669ac65d draft
(svn r11278) -Fix [FS#1342] (r11269): modulo result can be negative for signed int
author | glx <glx@openttd.org> |
---|---|
date | Tue, 16 Oct 2007 20:59:53 +0000 |
parents | 723ec770aa42 |
children | 948592b47ff4 |
files | src/player_face.h |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/player_face.h +++ b/src/player_face.h @@ -196,7 +196,7 @@ 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) {