diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:38 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:38 +0100 |
commit | d0ca838c7ab297036b4a7c45351761a48fe05efd (patch) | |
tree | f0f3cc006e8157d6bd699bd644b7dd7b35387ac2 /app/bin/utf8convert.c | |
parent | fd6639655b399a79fb72f494786a4f57da9c90e7 (diff) | |
parent | 5d2c2b27a6323e2666378b986129b2a7c2c39e5c (diff) |
Update upstream source from tag 'upstream/5.2.2GA'
Update to upstream version '5.2.2GA'
with Debian dir 9c80045d0b4f9e463647bc8af8c090a673df4132
Diffstat (limited to 'app/bin/utf8convert.c')
-rw-r--r-- | app/bin/utf8convert.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/app/bin/utf8convert.c b/app/bin/utf8convert.c index 0573c93..977a62c 100644 --- a/app/bin/utf8convert.c +++ b/app/bin/utf8convert.c @@ -22,9 +22,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <string.h> - -#include <wlib.h> #include "misc.h" #include "include/utf8convert.h" @@ -43,9 +40,9 @@ char * Convert2UTF8( char *string ) { if (RequiresConvToUTF8(string)) { - unsigned cnt = strlen(string) * 2 + 2; + size_t cnt = strlen(string) * 2 + 2; unsigned char *out = MyMalloc(cnt); - wSystemToUTF8(string, out, cnt); + wSystemToUTF8(string, out, (unsigned int)cnt); MyFree(string); return(out); } else { @@ -65,9 +62,9 @@ void ConvertUTF8ToSystem(unsigned char *in) { if (wIsUTF8(in)) { - unsigned cnt = strlen(in) * 2 + 1; + size_t cnt = strlen(in) * 2 + 2; unsigned char *out = MyMalloc(cnt); - wUTF8ToSystem(in, out, cnt); + wUTF8ToSystem(in, out, (unsigned int)cnt); strcpy(in, out); MyFree(out); } |