diff options
author | maedhros <maedhros@openttd.org> | 2007-07-04 13:01:55 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-07-04 13:01:55 +0000 |
commit | facf261b63b0fcc23e71070329078173dc2cb086 (patch) | |
tree | 258e46973b659abe994c7bb75beed3b7ab52a857 | |
parent | b863e50ac88f4b41db1a50741de740f7d7c60b4d (diff) | |
download | openttd-facf261b63b0fcc23e71070329078173dc2cb086.tar.xz |
(svn r10435) -Fix (r9315): numinfo starts from 1, not 0, so make it possible to define a house with a local id of 255.
-rw-r--r-- | src/newgrf.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index f99fdefb6..774bea8d4 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1187,8 +1187,8 @@ static bool TownHouseChangeInfo(uint hid, int numinfo, int prop, byte **bufp, in byte *buf = *bufp; bool ret = false; - if (hid + numinfo >= HOUSE_MAX) { - grfmsg(1, "TownHouseChangeInfo: Too many houses loaded (%u), max (%u). Ignoring.", hid + numinfo, HOUSE_MAX-1); + if (hid + numinfo > HOUSE_MAX) { + grfmsg(1, "TownHouseChangeInfo: Too many houses loaded (%u), max (%u). Ignoring.", hid + numinfo, HOUSE_MAX); return false; } |