Skip to content

Commit

Permalink
- pick the proper dot for cutting off the extension in ExtractFileBase.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed May 17, 2021
1 parent 6071cf6 commit 6e9c857
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/common/utility/cmdlib.cpp
Expand Up @@ -331,13 +331,8 @@ FString ExtractFileBase (const char *path, bool include_extension)
}
#endif

if (!include_extension)
if (!include_extension && (dot = strrchr(src, '.')))
{
dot = src;
while (*dot && *dot != '.')
{
dot++;
}
return FString(src, dot - src);
}
else
Expand Down

0 comments on commit 6e9c857

Please sign in to comment.