summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-12-02 19:21:13 +0000
committeryexo <yexo@openttd.org>2010-12-02 19:21:13 +0000
commit3df30280d4c82f688acaea5d2f7d4b1c0f7e00b0 (patch)
tree92d423f0db7ed595b9f0478004260cab42b59f57
parent6f549e54b57670a4b9e4121d0a2b453f9109bd42 (diff)
downloadopenttd-3df30280d4c82f688acaea5d2f7d4b1c0f7e00b0.tar.xz
(svn r21370) -Fix: [NewGRF] a grf with an invalid action14 could cause an out of memory error
-rw-r--r--src/newgrf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 5e6622ac0..bde9037e6 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -6697,7 +6697,7 @@ 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");
- if (!SkipUnknownInfo(buf, type)) return false;
+ return SkipUnknownInfo(buf, type);
}
if (id >= _cur_grfconfig->param_info.Length()) {