diff options
author | sapier <Sapier at GMX dot net> | 2015-01-17 19:14:36 +0100 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2015-01-17 19:14:36 +0100 |
commit | a39c136e69b53c4f14d6ddb6d5a2bebc23dc9cbe (patch) | |
tree | bc4dbe9d7a18a70eb96ddbd59c8269cfd5be9c5b | |
parent | 2959d6b3dac587e0843b8791a30d8c31e78d58b4 (diff) | |
download | minetest-a39c136e69b53c4f14d6ddb6d5a2bebc23dc9cbe.tar.gz minetest-a39c136e69b53c4f14d6ddb6d5a2bebc23dc9cbe.tar.bz2 minetest-a39c136e69b53c4f14d6ddb6d5a2bebc23dc9cbe.zip |
Fix NodeMetadataList loosing memory on deserialize due to invalid clear map call instead of clear
-rw-r--r-- | src/nodemetadata.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nodemetadata.cpp b/src/nodemetadata.cpp index b8c7d3d9c..1e40a1630 100644 --- a/src/nodemetadata.cpp +++ b/src/nodemetadata.cpp @@ -109,10 +109,10 @@ void NodeMetadataList::serialize(std::ostream &os) const void NodeMetadataList::deSerialize(std::istream &is, IGameDef *gamedef) { - m_data.clear(); + clear(); u8 version = readU8(is); - + if(version == 0){ // Nothing return; |