From: Perttu Ahola Date: Tue, 3 May 2011 14:33:51 +0000 (+0300) Subject: Fixed a temporary solution of server shutting down to an assert(0) when a too large... X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=59c4a342a9625fe37e9a7aa755e6deca14c3a110;p=zefram%2Fminetest%2Fminetest_engine.git Fixed a temporary solution of server shutting down to an assert(0) when a too large block metadata is sent to an old client --- diff --git a/src/mapblock.cpp b/src/mapblock.cpp index f84c6517..67e7e257 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -2109,9 +2109,17 @@ void MapBlock::serialize(std::ostream &os, u8 version) { if(version <= 15) { - std::ostringstream oss(std::ios_base::binary); - m_node_metadata.serialize(oss); - os< 65535) + throw SerializationError("String too long for serializeString"); char buf[2]; writeU16((u8*)&buf[0], plain.size()); std::string s;