summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
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;