ntdll: wine_nt_to_unix_file_name() parse string to int instead of cast char, where string may be passed.

This commit is contained in:
A C Hurst 2008-11-19 14:58:59 +00:00 committed by Alexandre Julliard
parent 6c551744ef
commit ad335b7e7f

View file

@ -1877,8 +1877,8 @@ static NTSTATUS get_dos_device( const WCHAR *name, UINT name_len, ANSI_STRING *u
dev[2] = 0; /* remove last ':' to get the drive mount point symlink */
new_name = get_default_drive_device( unix_name );
}
else if (!strncmp( dev, "com", 3 )) new_name = get_default_com_device( dev[3] - '0' );
else if (!strncmp( dev, "lpt", 3 )) new_name = get_default_lpt_device( dev[3] - '0' );
else if (!strncmp( dev, "com", 3 )) new_name = get_default_com_device( atoi(dev + 3 ));
else if (!strncmp( dev, "lpt", 3 )) new_name = get_default_lpt_device( atoi(dev + 3 ));
if (!new_name) break;