Commit 2c39191e authored by Dave Belanger's avatar Dave Belanger Committed by Alexandre Julliard

Fix splitpath and wsplitpath for the file extension.

parent ad24c559
......@@ -463,8 +463,11 @@ void _wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar
}
else if (dir) dir[0] = 0;
/* look for extension */
for (end = inpath; *end; end++) if (*end == '.') break;
/* look for extension: what's after the last dot */
end = NULL;
for (p = inpath; *p; p++) if (*p == '.') end = p;
if (!end) end = p; /* there's no extension */
if (fname)
{
......
......@@ -376,8 +376,11 @@ void __cdecl _splitpath(const char* inpath, char * drv, char * dir,
}
else if (dir) dir[0] = 0;
/* look for extension */
for (end = inpath; *end; end++) if (*end == '.') break;
/* look for extension: what's after the last dot */
end = NULL;
for (p = inpath; *p; p++) if (*p == '.') end = p;
if (!end) end = p; /* there's no extension */
if (fname)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment