Chunk: fix check for chunks with missing light data

This commit is contained in:
Matthias Schiffer 2015-09-19 21:44:51 +09:00
parent 1e14dabc2d
commit d677440f6d

View file

@ -99,7 +99,7 @@ void Chunk::parseChunk() {
void Chunk::analyzeChunk() {
std::shared_ptr<const NBT::ByteTag> lightPopulatedTag = level->get<NBT::ByteTag>("LightPopulated");
if (!lightPopulatedTag && lightPopulatedTag->getValue())
if (!(lightPopulatedTag && lightPopulatedTag->getValue()))
throw std::invalid_argument("light data missing");
sections = assertValue(level->get<NBT::ListTag<NBT::CompoundTag>>("Sections"));