Hi Nikolay,
On 12/04/12 10:33, Nikolay Sivov wrote:
- if (name[len] != '\')
return HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND);
- /* skip '' after root name */
- len++;
- /* at this point we have at least one '' in path */
- val = strrchrW(name, '\');
- keyname = SysAllocStringLen(&name[len], val-&name[len]);
It's better, but now if there is only one backslash, you will have val-&name[len] == -1.
Thanks, Jacek