diff options
Diffstat (limited to 'Source/kwsys/EncodingC.c')
-rw-r--r-- | Source/kwsys/EncodingC.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/kwsys/EncodingC.c b/Source/kwsys/EncodingC.c index a36eecc..cda78e2 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); |