forked from rosebudai/OpenRCT2-Web
Fix issue in 'GetExtension' (#7337)
`Path::GetExtension` would iterate over the full path instead of just the filename, meaning a path like `C:\My.docs\file` (note the missing extension in the filename) would return `.docs\file` as the extension.
This commit is contained in:
1 parent
13f7d3b6de
commit
44e893ab53
1 file changed
+1
-1
@@ -162,7 +162,7 @@ namespace Path
|
||||
const utf8 * GetExtension(const utf8 * path)
|
||||
{
|
||||
const utf8 * lastDot = nullptr;
|
||||
const utf8 * ch = path;
|
||||
const utf8 * ch = GetFileName(path);
|
||||
for (; *ch != '\0'; ch++)
|
||||
{
|
||||
if (*ch == '.')
|
||||
|
||||
Reference in new issue
Block a user