Module: wine Branch: master Commit: 733cdaa6984f89bd42f04004f93392572beac381 URL: https://source.winehq.org/git/wine.git/?a=commit;h=733cdaa6984f89bd42f04004f...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Jun 19 19:43:11 2019 +0200
kernelbase: Revert some incorrect differences with shlwapi.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernelbase/path.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c index d903841..82708be 100644 --- a/dlls/kernelbase/path.c +++ b/dlls/kernelbase/path.c @@ -1518,21 +1518,20 @@ LPSTR WINAPI PathCombineA(char *dst, const char *dir, const char *file) if (!dst) return NULL;
- dst[0] = 0; - if (!dir && !file) - return NULL; + goto fail;
if (dir && !MultiByteToWideChar(CP_ACP, 0, dir, -1, dirW, ARRAY_SIZE(dirW))) - return NULL; + goto fail;
if (file && !MultiByteToWideChar(CP_ACP, 0, file, -1, fileW, ARRAY_SIZE(fileW))) - return NULL; + goto fail;
if (PathCombineW(dstW, dir ? dirW : NULL, file ? fileW : NULL)) if (WideCharToMultiByte(CP_ACP, 0, dstW, -1, dst, MAX_PATH, 0, 0)) return dst; - +fail: + dst[0] = 0; return NULL; }
@@ -1945,7 +1944,7 @@ void WINAPI PathRemoveExtensionA(char *path) return;
path = PathFindExtensionA(path); - if (path && !*path) + if (path && *path) *path = '\0'; }
@@ -1957,7 +1956,7 @@ void WINAPI PathRemoveExtensionW(WCHAR *path) return;
path = PathFindExtensionW(path); - if (path && !*path) + if (path && *path) *path = '\0'; }
@@ -3924,7 +3923,7 @@ static HRESULT url_guess_scheme(const WCHAR *url, WCHAR *out, DWORD *out_len) BOOL j;
MultiByteToWideChar(CP_ACP, 0, - "Software\Microsoft\Windows\CurrentVersion\URL\Prefixes", 1, reg_path, MAX_PATH); + "Software\Microsoft\Windows\CurrentVersion\URL\Prefixes", -1, reg_path, MAX_PATH); RegOpenKeyExW(HKEY_LOCAL_MACHINE, reg_path, 0, 1, &newkey); index = 0; while (value_len = data_len = MAX_PATH,