diff options
author | Kahrl <kahrl@gmx.net> | 2013-07-14 00:55:47 +0200 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2013-07-14 23:06:31 +0200 |
commit | 112dbba7c4d38bf780e4e2f05bdff106b52ce2f9 (patch) | |
tree | 7fbe8695a950726a2b178cd6a012430d0d42e211 /src/inventory.cpp | |
parent | 9733dd5b5e5516e18775665db132b2446492716c (diff) | |
download | minetest-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.cpp | 4 |
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; |