Hugh McMaster : reg: Ignore the slash zero character sequence if a custom separator is specified.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Feb 25 10:56:04 CST 2016
Module: wine
Branch: master
Commit: b57b998354a6ceaa1aae2c6e0864e96fd7f846fe
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b57b998354a6ceaa1aae2c6e0864e96fd7f846fe
Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date: Thu Feb 25 19:54:09 2016 +1100
reg: Ignore the slash zero character sequence if a custom separator is specified.
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/reg/reg.c | 2 +-
programs/reg/tests/reg.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/programs/reg/reg.c b/programs/reg/reg.c
index 0155912..e66ba5a 100644
--- a/programs/reg/reg.c
+++ b/programs/reg/reg.c
@@ -290,7 +290,7 @@ static LPBYTE get_regdata(LPWSTR data, DWORD reg_type, WCHAR separator, DWORD *r
for (i = 0, destindex = 0; i < len; i++, destindex++)
{
- if (data[i] == '\\' && data[i + 1] == '0')
+ if (!separator && data[i] == '\\' && data[i + 1] == '0')
{
buffer[destindex] = 0;
i++;
diff --git a/programs/reg/tests/reg.c b/programs/reg/tests/reg.c
index 151739c..efb2839 100644
--- a/programs/reg/tests/reg.c
+++ b/programs/reg/tests/reg.c
@@ -391,15 +391,15 @@ static void test_add(void)
run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi19 /t REG_MULTI_SZ /s \"#\" /d \"two\\0#strings\" /f", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r);
- verify_reg(hkey, "multi19", REG_MULTI_SZ, "two\\0\0strings\0", 15, TODO_REG_SIZE|TODO_REG_DATA);
+ verify_reg(hkey, "multi19", REG_MULTI_SZ, "two\\0\0strings\0", 15, 0);
run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi20 /t REG_MULTI_SZ /s \"#\" /d \"two#\\0strings\" /f", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r);
- verify_reg(hkey, "multi20", REG_MULTI_SZ, "two\0\\0strings\0", 15, TODO_REG_SIZE|TODO_REG_DATA);
+ verify_reg(hkey, "multi20", REG_MULTI_SZ, "two\0\\0strings\0", 15, 0);
run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi21 /t REG_MULTI_SZ /s \"#\" /d \"two\\0\\0strings\" /f", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r);
- verify_reg(hkey, "multi21", REG_MULTI_SZ, "two\\0\\0strings\0", 16, TODO_REG_SIZE|TODO_REG_DATA);
+ verify_reg(hkey, "multi21", REG_MULTI_SZ, "two\\0\\0strings\0", 16, 0);
RegCloseKey(hkey);
More information about the wine-cvs
mailing list