From 616370eae34993be4961e690f8c008085a5b33b9 Mon Sep 17 00:00:00 2001 From: smatz Date: Mon, 10 Aug 2009 22:36:15 +0000 Subject: [PATCH] (svn r17150) -Codechange: when MapGRFStringID() fails to remap, return STR_EMPTY instead of 'random' string --- src/newgrf.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index eca778dca4..8c8b6e3292 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -320,7 +320,9 @@ StringID MapGRFStringID(uint32 grfid, StringID str) if (str == STR_NULL) return STR_EMPTY; - return str; + DEBUG(grf, 0, "Unknown StringID 0x%04X remapped to STR_EMPTY. Please open a Feature Request if you need it", str); + + return STR_EMPTY; } static inline uint8 MapDOSColour(uint8 colour)