From 3df30280d4c82f688acaea5d2f7d4b1c0f7e00b0 Mon Sep 17 00:00:00 2001 From: yexo Date: Thu, 2 Dec 2010 19:21:13 +0000 Subject: (svn r21370) -Fix: [NewGRF] a grf with an invalid action14 could cause an out of memory error --- src/newgrf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) { -- cgit v1.2.3-54-g00ecf