From 580d7c8b9f76c1501f3f515ce7a7126c7162f8ff Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Thu, 15 Mar 2018 22:09:01 -0500 Subject: [PATCH] Parse `defaultScene` value correcrly. Fixes #47. --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index c476a92..e29b968 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -2862,7 +2862,7 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, const char *str, // 9. Parse default scenes. { json::const_iterator rootIt = v.find("scene"); - if ((rootIt != v.end()) && rootIt.value().is_number_integer()) { + if ((rootIt != v.end()) && rootIt.value().is_number()) { const int defaultScene = rootIt.value(); model->defaultScene = static_cast(defaultScene);