diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-10-30 18:19:47 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-10-30 18:52:37 -0700 |
commit | 16459099afc4290fe6b2d2776ee003d7f1ff48f2 (patch) | |
tree | daeb7c9a5681d8a2408114340a418206f577e850 /common.cpp | |
parent | fa854d7a0153d6846cb15d1aaa8708e00827a00d (diff) |
Make C_ (gettext used in completions) return wcstring
Diffstat (limited to 'common.cpp')
-rw-r--r-- | common.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -255,7 +255,6 @@ char *wcs2str(const wchar_t *in) { if (! in) return NULL; - char *out; size_t desired_size = MAX_UTF8_BYTES*wcslen(in)+1; char local_buff[512]; if (desired_size <= sizeof local_buff / sizeof *local_buff) @@ -277,7 +276,7 @@ char *wcs2str(const wchar_t *in) else { // here we fall into the bad case of allocating a buffer probably much larger than necessary - out = (char *)malloc(MAX_UTF8_BYTES*wcslen(in)+1); + char *out = (char *)malloc(MAX_UTF8_BYTES*wcslen(in)+1); if (!out) { DIE_MEM(); |