mirror of https://github.com/OpenRCT2/OpenRCT2.git
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:
parent
13f7d3b6de
commit
44e893ab53
|
@ -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 == '.')
|
||||
|
|
Loading…
Reference in New Issue