From aa313a1a9d963ad81d32f5f248038dca743de150 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Mon, 23 Sep 2019 13:47:21 -0700 Subject: [PATCH] Made GetActualPath tolerant of multiple slashes --- BeefySysLib/platform/win/Platform.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BeefySysLib/platform/win/Platform.cpp b/BeefySysLib/platform/win/Platform.cpp index 65a7aee2..995afa9e 100644 --- a/BeefySysLib/platform/win/Platform.cpp +++ b/BeefySysLib/platform/win/Platform.cpp @@ -3202,8 +3202,12 @@ BFP_EXPORT void BFP_CALLTYPE BfpFile_GetActualPath(const char* inPathC, char* ou } ++i; + // Ignore multiple slashes in a row + while ((i < length) && ((inPath[i] == DIR_SEP_CHAR) || (inPath[i] == DIR_SEP_CHAR_ALT))) + ++i; + lastComponentStart = i; - addSeparator = true; + addSeparator = true; } TryStringOut(outPath, outPathC, inOutPathSize, (BfpResult*)outResult);