From c35819f0b7a5de26f564482de0c3f120b3703521 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 12 Sep 2023 08:46:02 +1000 Subject: [PATCH] Fix incorrect component type shown in warning message --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index 4348070..2480c83 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -4926,13 +4926,13 @@ static bool ParseDracoExtension(Primitive *primitive, Model *model, } if (supposedComponentType > model->accessors[primitive->indices].componentType) { - model->accessors[primitive->indices].componentType = supposedComponentType; if (warn) { (*warn) += "GLTF component type " + std::to_string(model->accessors[primitive->indices].componentType) + " is not sufficient for number of stored points," " treating as " + std::to_string(supposedComponentType) + "\n"; } + model->accessors[primitive->indices].componentType = supposedComponentType; } }