From 112dbba7c4d38bf780e4e2f05bdff106b52ce2f9 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Sun, 14 Jul 2013 00:55:47 +0200 Subject: Change ContentFeatures array to a vector --- src/inventory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/inventory.cpp') diff --git a/src/inventory.cpp b/src/inventory.cpp index 928021c2f..2ce50e019 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -175,7 +175,7 @@ void ItemStack::deSerialize(std::istream &is, IItemDefManager *itemdef) // Convert old materials if(material <= 0xff) material = content_translate_from_19_to_internal(material); - if(material > MAX_CONTENT) + if(material > 0xfff) throw SerializationError("Too large material number"); // Convert old id to name NameIdMapping legacy_nimap; @@ -194,7 +194,7 @@ void ItemStack::deSerialize(std::istream &is, IItemDefManager *itemdef) is>>material; u16 materialcount; is>>materialcount; - if(material > MAX_CONTENT) + if(material > 0xfff) throw SerializationError("Too large material number"); // Convert old id to name NameIdMapping legacy_nimap; -- cgit v1.2.3