Fixed find_last_of call in GetBaseFilename
this leads to a stack overflow on linux - it looks like this magically works on msvc though...
diff --git a/tiny_gltf.h b/tiny_gltf.h
index 6188dc0..586f8da 100644
--- a/tiny_gltf.h
+++ b/tiny_gltf.h
@@ -2041,8 +2041,7 @@
}
static std::string GetBaseFilename(const std::string &filepath) {
- constexpr char path_separators[2] = { '/', '\\' };
- auto idx = filepath.find_last_of(path_separators);
+ auto idx = filepath.find_last_of("/\\");
if (idx != std::string::npos)
return filepath.substr(idx + 1);
return filepath;