summaryrefslogtreecommitdiff
path: root/app/bin/utf8convert.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
commit5d2c2b27a6323e2666378b986129b2a7c2c39e5c (patch)
treece8982b6c0111f79791068de2c2d4c6ce3138a49 /app/bin/utf8convert.c
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
New upstream version 5.2.2GAupstream/5.2.2GA
Diffstat (limited to 'app/bin/utf8convert.c')
-rw-r--r--app/bin/utf8convert.c11
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);
}