]> git.lizzy.rs Git - minetest.git/blobdiff - src/wieldmesh.cpp
dofile error reporting for syntax errors
[minetest.git] / src / wieldmesh.cpp
index f12771968246af20127c2ea92f96dc3379d7c20f..036b25a907b850b7ab8a85f69562fb1bcd4ec234 100644 (file)
@@ -358,7 +358,7 @@ void WieldMeshSceneNode::setItem(const ItemStack &item, IGameDef *gamedef)
                                        / (BS * f.visual_scale));
                }
                u32 material_count = m_meshnode->getMaterialCount();
-               if (material_count >= 6) {
+               if (material_count > 6) {
                        errorstream << "WieldMeshSceneNode::setItem: Invalid material "
                                "count " << material_count << ", truncating to 6" << std::endl;
                        material_count = 6;