[REG] Sync with Wine Staging 3.9. CORE-14656
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 27 May 2018 02:48:33 +0000 (03:48 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 27 May 2018 02:48:33 +0000 (03:48 +0100)
base/applications/cmdutils/reg/export.c
base/applications/cmdutils/reg/import.c
media/doc/README.WINE

index 622e7ca..8b08da1 100644 (file)
@@ -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;
         }
index f2ce80e..779ea28 100644 (file)
@@ -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)
         {
index 6dc5502..db5c232 100644 (file)
@@ -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