kernel32: Print an error instead of crashing in GetLongPathNameW if shortpath=0.

This commit is contained in:
Louis. Lenders 2006-09-29 08:17:07 +01:00 committed by Alexandre Julliard
parent 353cd81c9a
commit 44da24759c
1 changed files with 3 additions and 1 deletions

View File

@ -294,7 +294,7 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
LPCWSTR p;
DWORD sp = 0, lp = 0;
DWORD tmplen;
BOOL unixabsolute = (shortpath[0] == '/');
BOOL unixabsolute;
WIN32_FIND_DATAW wfd;
HANDLE goit;
@ -318,6 +318,8 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
return strlenW(longpath);
}
unixabsolute = (shortpath[0] == '/');
/* check for drive letter */
if (!unixabsolute && shortpath[1] == ':' )
{