Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- Return with ERROR_INVALID_PARAMETER if size is 0.
dlls/kernel32/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c index 3419898407..eb0471cc8e 100644 --- a/dlls/kernel32/module.c +++ b/dlls/kernel32/module.c @@ -1612,7 +1612,7 @@ DWORD WINAPI K32GetModuleFileNameExA(HANDLE process, HMODULE module, if ( process == GetCurrentProcess() ) { len = GetModuleFileNameA( module, file_name, size ); - if (size) file_name[size - 1] = '\0'; + file_name[size - 1] = '\0'; return len; }