Skip to content
Permalink
Browse files

Fix regression in leveldb backend

  • Loading branch information...
sapier sapier
sapier authored and sapier committed Jul 6, 2014
1 parent 96f285f commit e14c4cdd4c3c9b554dc9cb91f8f29078ad337ded
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/database-leveldb.cpp
@@ -100,8 +100,7 @@ MapBlock* Database_LevelDB::loadBlock(v3s16 blockpos)
std::string datastr;
leveldb::Status status = m_database->Get(leveldb::ReadOptions(),
i64tos(getBlockAsInteger(blockpos)), &datastr);
ENSURE_STATUS_OK(status);
if (datastr.length() == 0) {
if (datastr.length() == 0 && status.ok()) {
errorstream << "Blank block data in database (datastr.length() == 0) ("
<< blockpos.X << "," << blockpos.Y << "," << blockpos.Z << ")" << std::endl;

@@ -112,7 +111,8 @@ MapBlock* Database_LevelDB::loadBlock(v3s16 blockpos)
throw SerializationError("Blank block data in database");
}
return NULL;
} else {
}
if (status.ok()) {
/*
Make sure sector is loaded
*/

0 comments on commit e14c4cd

Please sign in to comment.
You can’t perform that action at this time.