From 13266d4728f9695f1a30cecaaacaa3856c30c972 Mon Sep 17 00:00:00 2001 From: Christophe Le Roy Date: Sat, 24 Sep 2016 22:10:50 +0200 Subject: [PATCH] Warn about invalid node name IDs Unknown IDs are already mapped to m_blockIgnoreId by server, and should not appear here unless block data is corrupted. --- TileGenerator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TileGenerator.cpp b/TileGenerator.cpp index c585388..be73c34 100644 --- a/TileGenerator.cpp +++ b/TileGenerator.cpp @@ -523,8 +523,10 @@ inline void TileGenerator::renderMapBlock(const ustring &mapBlock, const BlockPo continue; } NameMap::iterator blockName = m_nameMap.find(content); - if (blockName == m_nameMap.end()) + if (blockName == m_nameMap.end()) { + std::cerr << "Skipping node with invalid name ID" << std::endl; continue; + } const string &name = blockName->second; ColorMap::const_iterator color = m_colorMap.find(name); if (color != m_colorMap.end()) {