wine/loader module.c

Eric Pouech pouech-eric at wanadoo.fr
Tue Mar 18 15:12:06 CST 2003


Alexandre Julliard wrote:
> Modified files:
> 	loader         : module.c 
> 
> Log message:
> 	Make GetModuleFileNameA call GetModuleFileNameW. Small cleanups.

the cleanups are wrong...
for example the following code:

     char c[5];
     DWORD len;

     len = GetModuleFileNameA(0, c, 4);
     c[4] = '\0';
     printf("len is %d/%d\n", len, strlen(c));

gives "len is 4/4" on W2K, while we get "len is 3/3" on wine
when the buffer is too small, GetModuleFileName doesn't put the 
terminating '\0' to the string, while wine does (and my patch didn't)
(and yes I do have a test sample, but that I haven't finished it yet)

A+
-- 
Eric Pouech




More information about the wine-devel mailing list