[Bug 38220] Chemcraft crashes with wine-1.7.38

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Mar 13 00:15:55 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=38220

--- Comment #3 from Bruno Jesus <00cpxxx at gmail.com> ---
This simple change makes it work for me, changing the variable with its value.
Any hints?

diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
index 7fe229f..8f590da 100644
--- a/dlls/kernel32/path.c
+++ b/dlls/kernel32/path.c
@@ -623,7 +623,7 @@ DWORD WINAPI GetTempPathW( DWORD count, LPWSTR path )
     {
         lstrcpynW(path, tmp_path, count);
         /* the remaining buffer must be zeroed */
-        memset(path + ret, 0, (count - ret) * sizeof(WCHAR));
+        memset(path + ret, 0, (260 - ret) * sizeof(WCHAR));
         ret--; /* return length without 0 */
     }
     else if (count)

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list