Parse defaultScene value correcrly. Fixes #47.

This commit is contained in:
Syoyo Fujita 2018-03-15 22:09:01 -05:00
parent e69069d53c
commit 580d7c8b9f

View File

@ -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<int>(defaultScene);