summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-12-12 06:14:53 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-12-12 06:16:14 (GMT)
commit6a90f3e67610b5a32cc701730773574ad36ae99c (patch)
tree8025dba67bac7dff319561de7a8a4fa20324d3e4 /src
parentc9ee0db8f8012eb523ef26de6b8a0b86181c2609 (diff)
Fixed sign extension when decoding UTF-8 data.
Diffstat (limited to 'src')
-rw-r--r--src/common/utf8.c2
-rw-r--r--src/common/utf8.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/common/utf8.c b/src/common/utf8.c
index 3c23a1b..c5cfa03 100644
--- a/src/common/utf8.c
+++ b/src/common/utf8.c
@@ -39,7 +39,7 @@
* *
******************************************************************************/
-unichar_t decode_utf8_char(const char *text, size_t len, size_t *consumed)
+unichar_t decode_utf8_char(const unsigned char *text, size_t len, size_t *consumed)
{
unichar_t result; /* Valeur à retourner */
size_t expected; /* Quantité à traiter */
diff --git a/src/common/utf8.h b/src/common/utf8.h
index 1bc6620..4b8437d 100644
--- a/src/common/utf8.h
+++ b/src/common/utf8.h
@@ -48,7 +48,7 @@ typedef uint32_t unichar_t;
/* Procède à la lecture d'un caractère dans une chaîne en UTF-8. */
-unichar_t decode_utf8_char(const char *, size_t, size_t *);
+unichar_t decode_utf8_char(const unsigned char *, size_t, size_t *);