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:
Hielke Morsink 2018-03-23 08:48:13 +01:00 committed by Ted John
parent 13f7d3b6de
commit 44e893ab53
1 changed files with 1 additions and 1 deletions

View File

@ -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 == '.')