Mercurial > hg > openttd
changeset 16106:530933b50339 draft
(svn r20799) -Fix: [NewGRF] clamp vehicle var 0xC2 (max age) to uint16 (Hirundo)
author | yexo <yexo@openttd.org> |
---|---|
date | Mon, 13 Sep 2010 13:55:25 +0000 |
parents | dc62a655c524 |
children | f1922c797590 |
files | src/newgrf_engine.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -742,8 +742,8 @@ case 0x3F: return v->cargo.DaysInTransit(); case 0x40: return ClampToU16(v->age); case 0x41: return GB(ClampToU16(v->age), 8, 8); - case 0x42: return v->max_age; - case 0x43: return GB(v->max_age, 8, 8); + case 0x42: return ClampToU16(v->max_age); + case 0x43: return GB(ClampToU16(v->max_age), 8, 8); case 0x44: return Clamp(v->build_year, ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR) - ORIGINAL_BASE_YEAR; case 0x45: return v->unitnumber; case 0x46: return Engine::Get(v->engine_type)->grf_prop.local_id;