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,13 +449,17 @@ LPSTR getRegKeyName(LPSTR lpLine)
keyNameBeg = strchr(lpLineCopy, '\\'); /* The key name start by '\' */
if (keyNameBeg) {
keyNameBeg++; /* is not part of the name */
if (lpLine[0] == '[') /* need to find matching ']' */
{
LPSTR keyNameEnd;
keyNameBeg++; /* is not part of the name */
keyNameEnd = strrchr(lpLineCopy, ']');
if (keyNameEnd) {
*keyNameEnd = '\0'; /* remove ']' from the key name */
}
}
} else {
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