msvcrt: Correctly set _stat64.st_dev fields in _wstat64.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2019-03-17 20:19:44 +01:00 committed by Alexandre Julliard
parent 82060ae8df
commit 513eb41f9a
1 changed files with 2 additions and 2 deletions

View File

@ -3157,8 +3157,8 @@ int CDECL MSVCRT__wstat64(const MSVCRT_wchar_t* path, struct MSVCRT__stat64 * bu
memset(buf,0,sizeof(struct MSVCRT__stat64));
/* FIXME: rdev isn't drive num, despite what the docs says-what is it? */
if (MSVCRT_iswalpha(*path))
buf->st_dev = buf->st_rdev = toupperW(*path - 'A'); /* drive num */
if (MSVCRT_iswalpha(*path) && path[1] == ':')
buf->st_dev = buf->st_rdev = toupperW(*path) - 'A'; /* drive num */
else
buf->st_dev = buf->st_rdev = MSVCRT__getdrive() - 1;