(svn r23788) -Fix: failure to load newgrf files that use action 0 general prop 15 with a missing language file

This commit is contained in:
yexo 2012-01-12 17:44:20 +00:00
parent 89ab59f0cb
commit ec54f39db5
1 changed files with 6 additions and 2 deletions

View File

@ -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;
}