MSI: Translate the resulting string only if the previous call succeeded

Dmitry Timoshkov dmitry at codeweavers.com
Thu May 25 08:17:46 CDT 2006


Hello,

Changelog:
    MSI: Translate the resulting string only if the previous call succeeded.

--- cvs/hq/wine/dlls/msi/msi.c	2006-05-24 13:16:13.000000000 +0900
+++ wine/dlls/msi/msi.c	2006-05-25 21:53:47.000000000 +0900
@@ -1610,8 +1610,10 @@ UINT WINAPI MsiProvideQualifiedComponent
 
     msi_free(szwComponent);
     msi_free(szwQualifier);
-    *pcchPathBuf = WideCharToMultiByte(CP_ACP, 0, lpwPathBuf, pcchwPathBuf,
-                    lpPathBuf, *pcchPathBuf, NULL, NULL);
+
+    if (rc == ERROR_SUCCESS)
+        *pcchPathBuf = WideCharToMultiByte(CP_ACP, 0, lpwPathBuf, pcchwPathBuf,
+                                           lpPathBuf, *pcchPathBuf, NULL, NULL);
 
     msi_free(lpwPathBuf);
     return rc;





More information about the wine-patches mailing list