summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-02-24 18:13:59 +0000
committeryexo <yexo@openttd.org>2011-02-24 18:13:59 +0000
commit89ff97f70ac340db3936836dbdcdf28182381faf (patch)
tree04844b114c139f1bf29e60aac6bfc2ba8407affa /src/newgrf.cpp
parent7d40c99378fa2517e4b9168726b34db90c02e683 (diff)
downloadopenttd-89ff97f70ac340db3936836dbdcdf28182381faf.tar.xz
(svn r22138) -Fix: skipping only the invalid part of an action14 failed, the rest of the action was skipped instead
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 0a70a41d4..58693c669 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -6726,6 +6726,8 @@ static bool ChangeGRFParamValueNames(ByteReader *buf)
if (type != 'T' || id > _cur_parameter->max_value) {
grfmsg(2, "StaticGRFInfo: all child nodes of 'INFO'->'PARA'->param_num->'VALU' should have type 't' and the value/bit number as id");
if (!SkipUnknownInfo(buf, type)) return false;
+ type = buf->ReadByte();
+ continue;
}
byte langid = buf->ReadByte();
@@ -6769,7 +6771,9 @@ static bool HandleParameterInfo(ByteReader *buf)
uint32 id = buf->ReadDWord();
if (type != 'C' || id >= _cur_grfconfig->num_valid_params) {
grfmsg(2, "StaticGRFInfo: all child nodes of 'INFO'->'PARA' should have type 'C' and their parameter number as id");
- return SkipUnknownInfo(buf, type);
+ if (!SkipUnknownInfo(buf, type)) return false;
+ type = buf->ReadByte();
+ continue;
}
if (id >= _cur_grfconfig->param_info.Length()) {