Fix deserialization of ItemDefinition (#5995)
authorRui <rui.minetest@gmail.com>
Fri, 16 Jun 2017 05:17:30 +0000 (14:17 +0900)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Fri, 16 Jun 2017 05:17:30 +0000 (07:17 +0200)
src/itemdef.cpp

index 8eca8cafb5e51af608ad9480a5ef49cfcee115bf..e73246115acaa04942fd42af70057d444965c731 100644 (file)
@@ -209,7 +209,7 @@ void ItemDefinition::deSerialize(std::istream &is)
                sound_place.name = deSerializeString(is);
                sound_place.gain = readF1000(is);
        }
-       if(version == 3) {
+       if(version >= 3) {
                range = readF1000(is);
        }
        // If you add anything here, insert it primarily inside the try-catch