[PATCH 0/1] MR6366: odbccp32: write_registry_values only append slash if required
From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/odbccp32/odbccp32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c index dba24e4b673..d76ae047abd 100644 --- a/dlls/odbccp32/odbccp32.c +++ b/dlls/odbccp32/odbccp32.c @@ -1045,6 +1045,7 @@ static void write_registry_values(const WCHAR *regkey, const WCHAR *driver, cons { if(GetFileAttributesW(divider) == INVALID_FILE_ATTRIBUTES) { + int pathlen = lstrlenW(path); len = lstrlenW(path) + lstrlenW(L"\\") + lstrlenW(divider) + 1; value = malloc(len * sizeof(WCHAR)); if(!value) @@ -1055,7 +1056,8 @@ static void write_registry_values(const WCHAR *regkey, const WCHAR *driver, cons } lstrcpyW(value, path); - lstrcatW(value, L"\\"); + if (path[pathlen] != '\\') + lstrcatW(value, L"\\"); } else { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6366
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details: The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=148011 Your paranoid android. === debian11b (64 bit WoW report) === user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 00000000008F00D8, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032
Hans Leidekker (@hans) commented about dlls/odbccp32/odbccp32.c:
}
lstrcpyW(value, path); - lstrcatW(value, L"\\"); + if (path[pathlen] != '\\') + lstrcatW(value, L"\\");
path[pathlen] is never a backslash. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6366#note_80118
participants (4)
-
Alistair Leslie-Hughes -
Alistair Leslie-Hughes (@alesliehughes) -
Hans Leidekker (@hans) -
Marvin