summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2013-07-14 00:55:47 +0200
committerKahrl <kahrl@gmx.net>2013-07-14 23:06:31 +0200
commit112dbba7c4d38bf780e4e2f05bdff106b52ce2f9 (patch)
tree7fbe8695a950726a2b178cd6a012430d0d42e211 /src/inventory.cpp
parent9733dd5b5e5516e18775665db132b2446492716c (diff)
downloadminetest-112dbba7c4d38bf780e4e2f05bdff106b52ce2f9.tar.gz
minetest-112dbba7c4d38bf780e4e2f05bdff106b52ce2f9.tar.bz2
minetest-112dbba7c4d38bf780e4e2f05bdff106b52ce2f9.zip
Change ContentFeatures array to a vector
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp4
1 files changed, 2 insertions, 2 deletions
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;