-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
This patch is a lot more readable than the past version IMO. I'll look at the other patches tomorrow.
Am 2014-10-27 13:10, schrieb Jonathan Vollebregt:
+static WCHAR *sanitize_path(WCHAR *key){
Inconsistent curly bracket placement. The other patches have more cases of that.
else
reg_message(STRING_INVALID_KEY);
Doesn't get_rootkey() implicitly take care of this? I don't see why you need an extra check for a single leading backslash.
There's one (intended?) side effect of this check though: It ensures that the code below doesn't crash on the input string "\".
- i = strlenW(key);
- if (key[i - 1] == '\')
key[i - 1] = 0;
Why do you need this? The existing code and the todo_wine test suggests that RegCreateKey accepts any number of trailing slashes. Adding a test for this in dlls/advapi32/tests/registry.c would be a good idea.
This is the only case where you modify the input string. If it indeed is not necessary you can change the parameter to a const WCHAR * and return a BOOL.