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

Alexandre Julliard julliard at winehq.org
Thu Nov 20 08:20:36 CST 2008


Module: wine
Branch: master
Commit: ad335b7e7f088476ce6f761945317c12fed885a6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ad335b7e7f088476ce6f761945317c12fed885a6

Author: A C Hurst <A.Hurst at sheffield.ac.uk>
Date:   Wed Nov 19 14:58:59 2008 +0000

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

---

 dlls/ntdll/directory.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 5c163f1..8a29098 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -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;
 




More information about the wine-cvs mailing list