https://git.reactos.org/?p=reactos.git;a=commitdiff;h=98cf80fbc5aee64b25271…
commit 98cf80fbc5aee64b2527170f270da683a22640a6
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun May 27 03:48:33 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun May 27 03:48:33 2018 +0100
[REG] Sync with Wine Staging 3.9. CORE-14656
---
base/applications/cmdutils/reg/export.c | 11 ++++++-----
base/applications/cmdutils/reg/import.c | 3 ++-
media/doc/README.WINE | 2 +-
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/base/applications/cmdutils/reg/export.c
b/base/applications/cmdutils/reg/export.c
index 622e7ca8d9..8b08da1299 100644
--- a/base/applications/cmdutils/reg/export.c
+++ b/base/applications/cmdutils/reg/export.c
@@ -39,7 +39,10 @@ static WCHAR *escape_string(WCHAR *str, size_t str_len, size_t
*line_len)
for (i = 0, escape_count = 0; i < str_len; i++)
{
WCHAR c = str[i];
- if (c == '\r' || c == '\n' || c == '\\' || c ==
'"' || c == '\0')
+
+ if (!c) break;
+
+ if (c == '\r' || c == '\n' || c == '\\' || c ==
'"')
escape_count++;
}
@@ -49,6 +52,8 @@ static WCHAR *escape_string(WCHAR *str, size_t str_len, size_t
*line_len)
{
WCHAR c = str[i];
+ if (!c) break;
+
switch (c)
{
case '\r':
@@ -67,10 +72,6 @@ static WCHAR *escape_string(WCHAR *str, size_t str_len, size_t
*line_len)
buf[pos++] = '\\';
buf[pos] = '"';
break;
- case '\0':
- buf[pos++] = '\\';
- buf[pos] = '0';
- break;
default:
buf[pos] = c;
}
diff --git a/base/applications/cmdutils/reg/import.c
b/base/applications/cmdutils/reg/import.c
index f2ce80e7cb..779ea2863b 100644
--- a/base/applications/cmdutils/reg/import.c
+++ b/base/applications/cmdutils/reg/import.c
@@ -409,7 +409,8 @@ static void free_parser_data(struct parser *parser)
static void prepare_hex_string_data(struct parser *parser)
{
- if (parser->data_type == REG_EXPAND_SZ || parser->data_type == REG_MULTI_SZ)
+ if (parser->data_type == REG_EXPAND_SZ || parser->data_type == REG_MULTI_SZ ||
+ parser->data_type == REG_SZ)
{
if (parser->is_unicode)
{
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 6dc5502c87..db5c232c42 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -227,7 +227,7 @@ reactos/win32ss/printing/monitors/localmon/ui/ # Synced to
WineStaging-3.3 (kno
ReactOS shares the following programs with Winehq.
reactos/base/applications/cmdutils/cscript # Synced to WineStaging-3.3
-reactos/base/applications/cmdutils/reg # Synced to WineStaging-3.3
+reactos/base/applications/cmdutils/reg # Synced to WineStaging-3.9
reactos/base/applications/cmdutils/schtasks # Synced to WineStaging-3.3
reactos/base/applications/cmdutils/taskkill # Synced to WineStaging-3.3
reactos/base/applications/cmdutils/wmic # Synced to WineStaging-3.3