regedit: Correctly parse key name containing ']' when deleting/exporting.
This commit is contained in:
parent
054fd8cb42
commit
4de636208f
|
@ -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 */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue