# HG changeset patch # User peter1138 # Date 1172264637 0 # Node ID f47815f367a20df84408538a05031e0c94ee4daa # Parent a8303346cd9cf0b24ab6c710bd778e3d340ae306 (svn r8865) -Codechange: (NewGRF) Ignore 1 byte action 0s during safety check diff --git a/src/newgrf.cpp b/src/newgrf.cpp --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1480,6 +1480,11 @@ uint8 numinfo; uint8 index; + if (len == 1) { + grfmsg(8, "Silently ignoring one-byte special sprite 0x00"); + return; + } + if (!check_length(len, 6, "SafeChangeInfo")) return; buf++; feature = grf_load_byte(&buf);