KERNEL32: Small fix for GetModuleFileName16

Felix Nawothnig felix.nawothnig at t-online.de
Thu Jul 21 10:21:34 CDT 2005


OFSTRUCT.szPathName contains the long path (and that's correct, verified 
on Win95) so we shouldn't do a long->long translation...

This fixes the (minor) issue I described at 
http://bugs.winehq.org/show_bug.cgi?id=3142

ChangeLog:
Convert long to short path in GetModuleFileName16
-------------- next part --------------
Index: dlls/kernel/ne_module.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/ne_module.c,v
retrieving revision 1.49
diff -u -p -r1.49 ne_module.c
--- dlls/kernel/ne_module.c	5 Jul 2005 12:52:08 -0000	1.49
+++ dlls/kernel/ne_module.c	21 Jul 2005 15:14:49 -0000
@@ -1596,8 +1596,8 @@ INT16 WINAPI GetModuleFileName16( HINSTA
 
     if (!(pModule = NE_GetPtr( hModule ))) return 0;
     lstrcpynA( lpFileName, NE_MODULE_NAME(pModule), nSize );
-    if (pModule->ne_expver >= 0x400)
-        GetLongPathNameA(NE_MODULE_NAME(pModule), lpFileName, nSize);
+    if (pModule->ne_expver < 0x400)
+        GetShortPathNameA(NE_MODULE_NAME(pModule), lpFileName, nSize);
     TRACE("%04x -> '%s'\n", hModule, lpFileName );
     return strlen(lpFileName);
 }


More information about the wine-patches mailing list