summaryrefslogtreecommitdiff
path: root/win32/registry.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/registry.c')
-rw-r--r--win32/registry.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/win32/registry.c b/win32/registry.c
index 752bc38128..9c674c0819 100644
--- a/win32/registry.c
+++ b/win32/registry.c
@@ -133,10 +133,12 @@ static int LoadDirectory(HashTable *directories, HKEY key, char *path, int path_
if (path_len) {
memcpy(new_path, path, path_len);
new_path[path_len] = '/';
- path_len++;
+ memcpy(new_path+path_len+1, name, name_len+1);
+ zend_str_tolower(new_path, path_len+name_len+1);
+ } else {
+ memcpy(new_path, name, name_len+1);
+ zend_str_tolower(new_path, name_len);
}
- memcpy(new_path+path_len, name, name_len+1);
- zend_str_tolower(new_path, path_len+name_len);
if (LoadDirectory(directories, subkey, new_path, path_len+name_len, ht)) {
ret = 1;
}