diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 727f39f6158..5bb991865e6 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -402,8 +402,7 @@ static BOOL REGPROC_unescape_string(WCHAR *str, WCHAR **unparsed) str[val_idx] = '\r'; break; case '0': - str[val_idx] = '\0'; - break; + return FALSE; case '\\': case '"': str[val_idx] = str[str_idx]; diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index 9b431fa6f38..7d2c9416bcc 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -1694,12 +1694,12 @@ static void test_invalid_import(void) "\"Wine33d\"=\"Value2\\0\\0\\0\\0\"\n" "\"Wine33e\"=\"Value3\\0Value4\"\n" "\"Wine33f\"=\"\\0Value5\"\n\n"); - todo_wine verify_reg_nonexist(hkey, "Wine33a"); - todo_wine verify_reg_nonexist(hkey, "Wine33b"); - todo_wine verify_reg_nonexist(hkey, "Wine33c"); - todo_wine verify_reg_nonexist(hkey, "Wine33d"); - todo_wine verify_reg_nonexist(hkey, "Wine33e"); - todo_wine verify_reg_nonexist(hkey, "Wine33f"); + verify_reg_nonexist(hkey, "Wine33a"); + verify_reg_nonexist(hkey, "Wine33b"); + verify_reg_nonexist(hkey, "Wine33c"); + verify_reg_nonexist(hkey, "Wine33d"); + verify_reg_nonexist(hkey, "Wine33e"); + verify_reg_nonexist(hkey, "Wine33f"); close_key(hkey); @@ -2205,12 +2205,12 @@ static void test_invalid_import_unicode(void) "\"Wine33d\"=\"Value2\\0\\0\\0\\0\"\n" "\"Wine33e\"=\"Value3\\0Value4\"\n" "\"Wine33f\"=\"\\0Value5\"\n\n"); - todo_wine verify_reg_nonexist(hkey, "Wine33a"); - todo_wine verify_reg_nonexist(hkey, "Wine33b"); - todo_wine verify_reg_nonexist(hkey, "Wine33c"); - todo_wine verify_reg_nonexist(hkey, "Wine33d"); - todo_wine verify_reg_nonexist(hkey, "Wine33e"); - todo_wine verify_reg_nonexist(hkey, "Wine33f"); + verify_reg_nonexist(hkey, "Wine33a"); + verify_reg_nonexist(hkey, "Wine33b"); + verify_reg_nonexist(hkey, "Wine33c"); + verify_reg_nonexist(hkey, "Wine33d"); + verify_reg_nonexist(hkey, "Wine33e"); + verify_reg_nonexist(hkey, "Wine33f"); close_key(hkey);