summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--win32/registry.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/win32/registry.c b/win32/registry.c
index 6eda0f9fff..95d142cfa8 100644
--- a/win32/registry.c
+++ b/win32/registry.c
@@ -38,6 +38,9 @@ void UpdateIniFromRegistry(char *path TSRMLS_DC)
drive_letter = tmp_buf[0];
cwd++;
}
+ while (*cwd == '\\' || *cwd == '/') {
+ cwd++;
+ }
path = (char *) emalloc(2+strlen(cwd)+1+strlen(orig_path)+1);
sprintf(path, "%c\\%s\\%s", drive_letter, cwd, orig_path);
efree(orig_path);