1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Made GetActualPath tolerant of multiple slashes

This commit is contained in:
Brian Fiete 2019-09-23 13:47:21 -07:00
parent 54b77f400a
commit aa313a1a9d

View file

@ -3202,8 +3202,12 @@ BFP_EXPORT void BFP_CALLTYPE BfpFile_GetActualPath(const char* inPathC, char* ou
} }
++i; ++i;
// Ignore multiple slashes in a row
while ((i < length) && ((inPath[i] == DIR_SEP_CHAR) || (inPath[i] == DIR_SEP_CHAR_ALT)))
++i;
lastComponentStart = i; lastComponentStart = i;
addSeparator = true; addSeparator = true;
} }
TryStringOut(outPath, outPathC, inOutPathSize, (BfpResult*)outResult); TryStringOut(outPath, outPathC, inOutPathSize, (BfpResult*)outResult);