diff --git a/tiny_gltf.h b/tiny_gltf.h index 62006c4..153bcec 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -2245,7 +2245,7 @@ static std::string GetFilePathExtension(const std::string &FileName) { static std::string GetBaseDir(const std::string &filepath) { if (filepath.find_last_of("/\\") != std::string::npos) - return filepath.substr(0, filepath.find_last_of("/\\")); + return filepath.substr(0, filepath.find_last_of("/\\") + 1); return ""; }