kernel32: Print an error instead of crashing in GetLongPathNameW if shortpath=0.
This commit is contained in:
parent
353cd81c9a
commit
44da24759c
|
@ -294,7 +294,7 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
|
||||||
LPCWSTR p;
|
LPCWSTR p;
|
||||||
DWORD sp = 0, lp = 0;
|
DWORD sp = 0, lp = 0;
|
||||||
DWORD tmplen;
|
DWORD tmplen;
|
||||||
BOOL unixabsolute = (shortpath[0] == '/');
|
BOOL unixabsolute;
|
||||||
WIN32_FIND_DATAW wfd;
|
WIN32_FIND_DATAW wfd;
|
||||||
HANDLE goit;
|
HANDLE goit;
|
||||||
|
|
||||||
|
@ -318,6 +318,8 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
|
||||||
return strlenW(longpath);
|
return strlenW(longpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unixabsolute = (shortpath[0] == '/');
|
||||||
|
|
||||||
/* check for drive letter */
|
/* check for drive letter */
|
||||||
if (!unixabsolute && shortpath[1] == ':' )
|
if (!unixabsolute && shortpath[1] == ':' )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue