From 1bdd404c041f9c5e4a37f3af94422115e24172c4 Mon Sep 17 00:00:00 2001 From: Patrick Mc Gartoll Date: Thu, 16 May 2024 18:11:26 -0700 Subject: [PATCH] Fix stripping of slashes from paths --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ""; }