mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
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:
@@ -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