summaryrefslogtreecommitdiff
path: root/Source/kwsys/EncodingC.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-12-19 10:44:29 -0500
committerBrad King <brad.king@kitware.com>2013-12-19 10:44:29 -0500
commit2a943d9264c995f3d2c55b3da202b88f67329750 (patch)
tree16a35312f8ad76d32c33492ce3ca53a353477400 /Source/kwsys/EncodingC.c
parentb375c18b9ea256e2e9a05fd8465c6d90b86b6f5b (diff)
parentf788d9a1b27efc9b463b1174a93e780bef00a5d9 (diff)
downloadcmake-2a943d9264c995f3d2c55b3da202b88f67329750.tar.gz
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/EncodingC.c')
-rw-r--r--Source/kwsys/EncodingC.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/kwsys/EncodingC.c b/Source/kwsys/EncodingC.c
index a36eeccbf7..cda78e2896 100644
--- a/Source/kwsys/EncodingC.c
+++ b/Source/kwsys/EncodingC.c
@@ -68,7 +68,7 @@ size_t kwsysEncoding_wcstombs(char* dest, const wchar_t* str, size_t n)
char* kwsysEncoding_DupToNarrow(const wchar_t* str)
{
char* ret = NULL;
- size_t length = kwsysEncoding_wcstombs(0, str, 0);
+ size_t length = kwsysEncoding_wcstombs(0, str, 0) + 1;
if(length > 0)
{
ret = malloc(length);