From ec54f39db51841b2e05426e6c5951cf00ab9723d Mon Sep 17 00:00:00 2001 From: yexo Date: Thu, 12 Jan 2012 17:44:20 +0000 Subject: (svn r23788) -Fix: failure to load newgrf files that use action 0 general prop 15 with a missing language file --- src/newgrf.cpp | 8 ++++++-- 1 file 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; } -- cgit v1.2.3-70-g09d2