From: Sfan5 Date: Tue, 3 Dec 2013 19:03:20 +0000 (+0100) Subject: Fix LevelDB maps X-Git-Tag: 0.4.9~57 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d9de9f23d93a9a6fd8deccbbf3fce58aad5751a1;p=oweals%2Fminetest.git Fix LevelDB maps --- diff --git a/src/database-leveldb.cpp b/src/database-leveldb.cpp index 2a8f59c20..0526b0b29 100644 --- a/src/database-leveldb.cpp +++ b/src/database-leveldb.cpp @@ -94,7 +94,7 @@ MapBlock* Database_LevelDB::loadBlock(v3s16 blockpos) std::string datastr; leveldb::Status s = m_database->Get(leveldb::ReadOptions(), i64tos(getBlockAsInteger(blockpos)), &datastr); - if (datastr.length() == 0) { + if (datastr.length() == 0 && s.ok()) { errorstream << "Blank block data in database (datastr.length() == 0) (" << blockpos.X << "," << blockpos.Y << "," << blockpos.Z << ")" << std::endl;