From d3eb7a10bea6825c0ff2da9f459a1b528a6a410f Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 23 Jul 2026 19:29:44 +0300 Subject: [PATCH] fix texture-faces reading --- src/content/loading/BlockLoader.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/content/loading/BlockLoader.cpp b/src/content/loading/BlockLoader.cpp index f44d3a9ca..56903db79 100644 --- a/src/content/loading/BlockLoader.cpp +++ b/src/content/loading/BlockLoader.cpp @@ -53,6 +53,9 @@ static void load_variant( } } else if (root.has("texture-faces")) { const auto& texarr = root["texture-faces"]; + if (texarr.length() < 6) { + throw std::runtime_error("texture-faces requires 6 elements"); + } for (uint i = 0; i < 6; i++) { variant.textureFaces[i] = texarr[i].asString(); }