From eb98bfaa31cc5bd79b0202b815a4ee6b7464fc03 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 5 Nov 2017 21:17:35 +0000 Subject: [PATCH] Log invalid g2 access --- src/openrct2/drawing/Sprite.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/openrct2/drawing/Sprite.cpp b/src/openrct2/drawing/Sprite.cpp index fd048d566a..ceef901fff 100644 --- a/src/openrct2/drawing/Sprite.cpp +++ b/src/openrct2/drawing/Sprite.cpp @@ -767,11 +767,7 @@ extern "C" const uint32 idx = image_id - SPR_G2_BEGIN; if (idx >= _g2.header.num_entries) { - // TODO I guess we still want to warn the user, but an assert is not very good. - // Logging to stdout isn't ideal either as it would flood the console with - // the same message. - // openrct2_assert(idx < _g2.header.num_entries, - // "Invalid entry in g2.dat requested, idx = %u. You may have to update your g2.dat.", idx); + log_warning("Invalid entry in g2.dat requested, idx = %u. You may have to update your g2.dat.", idx); return nullptr; } return &_g2.elements[idx];