From d65fe36081e946a8df9ee87d8addfa73eb310aeb Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Tue, 28 Nov 2023 07:35:57 -0500 Subject: [PATCH] Make this easier to read --- source/Irrlicht/CB3DJSONMeshFileLoader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp index c7a30cc4..65da73f5 100644 --- a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp @@ -257,10 +257,11 @@ std::tuple CB3DJSONMeshFileLoader::readChunkTEXS() { B3DTexture.TextureName.replace('\\','/'); } else { - + if (t.contains("name") && !t["name"].is_string()) { return {false, "\"name\" in TEXS block index (" + std::to_string(index) +") is not a string."}; } + return {false, "Missing \"name\" in TEXS block index (" + std::to_string(index) +")."}; }