mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 08:36:16 +00:00
Fix getting subkey with trailing or duplacate backslashes (#674)
This PR fixes opening a registry key with trailing or repeating backslashes. For example, the following code should open the key without any error: `RegOpenKeyExW(HKEY_LOCAL_MACHINE, LR"(SOFTWARE\Microsoft\\Windows\CurrentVersion\\Run\)", 0, KEY_READ, &hKey);`
This commit is contained in:
@@ -107,6 +107,11 @@ class hive_parser
|
||||
|
||||
for (const auto& key_part : key)
|
||||
{
|
||||
if (key_part.empty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!current_key)
|
||||
{
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user