Fix parsing of glTF version
Handle version as int in gltf Fix format specifiers in glTF version parser
This commit is contained in:
@@ -109,7 +109,8 @@ bool glTFImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool
|
||||
glTF::Asset asset(pIOHandler);
|
||||
try {
|
||||
asset.Load(pFile, extension == "glb");
|
||||
return asset.asset.version < 2;
|
||||
std::string version = asset.asset.version;
|
||||
return !version.empty() && version[0] == '1';
|
||||
} catch (...) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user