Commit 4de63620 authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

regedit: Correctly parse key name containing ']' when deleting/exporting.

parent 054fd8cb
...@@ -449,12 +449,16 @@ LPSTR getRegKeyName(LPSTR lpLine) ...@@ -449,12 +449,16 @@ LPSTR getRegKeyName(LPSTR lpLine)
keyNameBeg = strchr(lpLineCopy, '\\'); /* The key name start by '\' */ keyNameBeg = strchr(lpLineCopy, '\\'); /* The key name start by '\' */
if (keyNameBeg) { if (keyNameBeg) {
LPSTR keyNameEnd;
keyNameBeg++; /* is not part of the name */ keyNameBeg++; /* is not part of the name */
keyNameEnd = strrchr(lpLineCopy, ']');
if (keyNameEnd) { if (lpLine[0] == '[') /* need to find matching ']' */
*keyNameEnd = '\0'; /* remove ']' from the key name */ {
LPSTR keyNameEnd;
keyNameEnd = strrchr(lpLineCopy, ']');
if (keyNameEnd) {
*keyNameEnd = '\0'; /* remove ']' from the key name */
}
} }
} else { } else {
keyNameBeg = lpLineCopy + strlen(lpLineCopy); /* branch - empty string */ keyNameBeg = lpLineCopy + strlen(lpLineCopy); /* branch - empty string */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment