From d9de9f23d93a9a6fd8deccbbf3fce58aad5751a1 Mon Sep 17 00:00:00 2001 From: Sfan5 Date: Tue, 3 Dec 2013 20:03:20 +0100 Subject: [PATCH] Fix LevelDB maps --- src/database-leveldb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.25.1