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.
This commit is contained in:
Christophe Le Roy 2016-09-24 22:10:50 +02:00
parent 86ea456127
commit 13266d4728
1 changed files with 3 additions and 1 deletions

View File

@ -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()) {