summaryrefslogtreecommitdiffstats
path: root/Source/cm_utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cm_utf8.c')
-rw-r--r--Source/cm_utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cm_utf8.c b/Source/cm_utf8.c
index 3d4ca16..9c11f2b 100644
--- a/Source/cm_utf8.c
+++ b/Source/cm_utf8.c
@@ -50,7 +50,7 @@ const char* cm_utf8_decode_character(const char* first, const char* last,
unsigned int* pc)
{
/* Count leading ones in the first byte. */
- unsigned char c = *first++;
+ unsigned char c = (unsigned char)*first++;
unsigned char const ones = cm_utf8_ones[c];
switch(ones)
{
@@ -65,7 +65,7 @@ const char* cm_utf8_decode_character(const char* first, const char* last,
unsigned char left;
for(left = ones-1; left && first != last; --left)
{
- c = *first++;
+ c = (unsigned char)*first++;
if(cm_utf8_ones[c] != 1)
{
return 0;