summaryrefslogtreecommitdiff
path: root/src/nodedef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r--src/nodedef.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index 39ea1a60e..ccbb42c66 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -482,6 +482,7 @@ void ContentFeatures::deSerialize(std::istream &is)
liquid_viscosity = readU8(is);
liquid_renewable = readU8(is);
light_source = readU8(is);
+ light_source = MYMIN(light_source, LIGHT_MAX);
damage_per_second = readU32(is);
node_box.deSerialize(is);
selection_box.deSerialize(is);
@@ -1442,6 +1443,7 @@ void ContentFeatures::deSerializeOld(std::istream &is, int version)
liquid_alternative_source = deSerializeString(is);
liquid_viscosity = readU8(is);
light_source = readU8(is);
+ light_source = MYMIN(light_source, LIGHT_MAX);
damage_per_second = readU32(is);
node_box.deSerialize(is);
selection_box.deSerialize(is);