Zebediah Figura : regedit: When processing 3.1 ignore any lines that don' t begin with HKCR.

Alexandre Julliard julliard at winehq.org
Tue Jan 31 15:42:52 CST 2017


Module: wine
Branch: master
Commit: 679cc5019586e7ab4a40db2ec1d065595b20db58
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=679cc5019586e7ab4a40db2ec1d065595b20db58

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Jan 31 00:41:19 2017 -0600

regedit: When processing 3.1 ignore any lines that don't begin with HKCR.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/regedit/regproc.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c
index c055c10..25c0240 100644
--- a/programs/regedit/regproc.c
+++ b/programs/regedit/regproc.c
@@ -616,8 +616,9 @@ static void processRegEntry31(WCHAR *line)
     int res;
 
     static WCHAR empty[] = {0};
+    static WCHAR hkcr[] = {'H','K','E','Y','_','C','L','A','S','S','E','S','_','R','O','O','T'};
 
-    if (line[0] == '\0') return;
+    if (strncmpW(line, hkcr, sizeof(hkcr) / sizeof(WCHAR))) return;
 
     /* get key name */
     while (line[key_end] && !isspaceW(line[key_end])) key_end++;
@@ -769,11 +770,11 @@ static void processRegLinesA(FILE *in, char* first_chars)
             *s_eol = '\0';
 
 	    /* Check if the line is a header string */
-	    if (!memcmp(line, header_31, sizeof(header_31))) {
+	    if (!strcmp(line, header_31)) {
 		version = REG_VERSION_31;
-	    } else if (!memcmp(line, header_40, sizeof(header_40))) {
+	    } else if (!strcmp(line, header_40)) {
 		version = REG_VERSION_40;
-	    } else if (!memcmp(line, header_50, sizeof(header_50))) {
+	    } else if (!strcmp(line, header_50)) {
 		version = REG_VERSION_50;
 	    } else {
 		lineW = GetWideString(line);




More information about the wine-cvs mailing list