diff options
author | yexo <yexo@openttd.org> | 2012-01-12 17:44:20 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2012-01-12 17:44:20 +0000 |
commit | ec54f39db51841b2e05426e6c5951cf00ab9723d (patch) | |
tree | fef692f56799f5ffd8168b4eb545b9562642a0b2 | |
parent | 89ab59f0cb63f15bea903c9f0b5c08c1842e1647 (diff) | |
download | openttd-ec54f39db51841b2e05426e6c5951cf00ab9723d.tar.xz |
(svn r23788) -Fix: failure to load newgrf files that use action 0 general prop 15 with a missing language file
-rw-r--r-- | src/newgrf.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index b8c75107e..0e10667e8 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2518,8 +2518,12 @@ static ChangeInfoResult GlobalVarChangeInfo(uint gvid, int numinfo, int prop, By if (lang == NULL) { grfmsg(1, "GlobalVarChangeInfo: Language %d is not known, ignoring", curidx); /* Skip over the data. */ - while (buf->ReadByte() != 0) { - buf->ReadString(); + if (prop == 0x15) { + buf->ReadByte(); + } else { + while (buf->ReadByte() != 0) { + buf->ReadString(); + } } break; } |