Mercurial > hg > openttd
diff src/station_cmd.cpp @ 5660:8ba2b1e4ef83 draft
(svn r8120) -Fix (r8055): Station cargo waiting value clamp should be signed not unsigned. This resulted in cargo magically appearing...
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Sun, 14 Jan 2007 18:38:40 +0000 |
parents | 358c07fb3212 |
children | 3cc382938839 |
line wrap: on
line diff
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2524,8 +2524,8 @@ // if rating is <= 127 and there are any items waiting, maybe remove some goods. if (rating <= 127 && waiting != 0) { uint32 r = Random(); - if ( (uint)rating <= (r & 0x7F) ) { - waiting = max(waiting - ((r >> 8)&3) - 1, 0U); + if (rating <= (int)GB(r, 0, 7)) { + waiting = max(waiting - (int)GB(r, 8, 2) - 1, 0); waiting_changed = true; } }