From abb231b633d34b303196e5acac03ffe6a8c6f967 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 18 Feb 2009 12:53:44 +0000 Subject: Fix ucs4->utf8 conversion. It probably helps to return the number of bytes in the buffer, rather than the free space. svn path=/trunk/netsurf/; revision=6558 --- utils/utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/utf8.c') diff --git a/utils/utf8.c b/utils/utf8.c index 6721305fb..840c5e1e6 100644 --- a/utils/utf8.c +++ b/utils/utf8.c @@ -172,7 +172,7 @@ size_t utf8_from_ucs4(uint32_t c, char *s) return 3; } - return len; + return 6 - len; #else uint8_t *buf; uint8_t l = 0; -- cgit v1.2.3