From c2cb4d61b8c75c570e30a19a879d0a0cc803b1b0 Mon Sep 17 00:00:00 2001 From: yexo Date: Thu, 2 Dec 2010 19:21:13 +0000 Subject: [PATCH] (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 5e6622ac0c..bde9037e62 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()) {