summaryrefslogtreecommitdiff
path: root/app/bin/utf8convert.c
diff options
context:
space:
mode:
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);
}