From d899b21504c02cae99eb3688e561cf9bad4120c4 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Mon, 27 Jul 2020 09:05:53 +0500 Subject: Support for non-overworld dimensions --- src/Section.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Section.cpp') diff --git a/src/Section.cpp b/src/Section.cpp index 29a6a0e..4a15c58 100644 --- a/src/Section.cpp +++ b/src/Section.cpp @@ -42,7 +42,10 @@ Section::Section(Vector pos, unsigned char bitsPerBlock, std::vectorblock = std::move(blockData); this->palette = std::move(palette); std::copy(lightData.begin(), lightData.end(), light); - std::copy(skyData.begin(), skyData.end(), sky); + if (!skyData.empty()) + std::copy(skyData.begin(), skyData.end(), sky); + else + memset(sky, 0, sizeof(sky)); hash = -1; CalculateHash(); -- cgit v1.2.3