summaryrefslogtreecommitdiff
path: root/win32/registry.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/registry.c')
-rw-r--r--win32/registry.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/win32/registry.c b/win32/registry.c
index e96bf91871..752bc38128 100644
--- a/win32/registry.c
+++ b/win32/registry.c
@@ -217,8 +217,7 @@ void UpdateIniFromRegistry(char *path TSRMLS_DC)
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);
+ spprintf(&path, 0, "%c\\%s\\%s", drive_letter, cwd, orig_path);
efree(orig_path);
orig_path = path;
}