From 1dbfe0ee130c753551e380941b12eec0f7ccd68a Mon Sep 17 00:00:00 2001 From: Layla Date: Sun, 7 May 2017 16:56:55 -0400 Subject: [PATCH] Possible fix for child values not being properly deserialized. * Add the child_value parsed by ParseObjectProperty to the return value The omission of adding child_value to the return object appears to have been an oversight, as it is the only case where the parsed value is not added, and because child_value is otherwise unreferenced. This change also does give us the value that we are expecting in our use case after loading our glTF. Was this an oversight or an intentional omission? --- tiny_gltf_loader.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tiny_gltf_loader.h b/tiny_gltf_loader.h index 109147c..430fbd9 100644 --- a/tiny_gltf_loader.h +++ b/tiny_gltf_loader.h @@ -1021,6 +1021,7 @@ static void ParseObjectProperty(Value *ret, const picojson::object &o) { } else if (v.is()) { tinygltf::Value child_value; ParseObjectProperty(&child_value, v.get()); + vo[it->first] = child_value; } // TODO(syoyo) binary, array }