about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/string.c b/Src/string.c
index 2bd1baea3..04e7446c9 100644
--- a/Src/string.c
+++ b/Src/string.c
@@ -64,7 +64,7 @@ wcs_ztrdup(const wchar_t *s)
 
     if (!s)
 	return NULL;
-    t = (wchar_t *)zalloc(wcslen((wchar_t *)s) + 1);
+    t = (wchar_t *)zalloc(sizeof(wchar_t) * (wcslen((wchar_t *)s) + 1));
     wcscpy(t, s);
     return t;
 }