From d921353f148081c3e0f3cd3bf7c65654d95e7f3f Mon Sep 17 00:00:00 2001 From: Grissiom Date: Wed, 20 May 2015 10:28:44 +0800 Subject: [PATCH] freetype: misc fix in gb2312tounicode --- .../freetype/builds/rt-thread/gb2312tounicode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/external/freetype/builds/rt-thread/gb2312tounicode.c b/components/external/freetype/builds/rt-thread/gb2312tounicode.c index ca7a263fcb..43ff5ae66b 100644 --- a/components/external/freetype/builds/rt-thread/gb2312tounicode.c +++ b/components/external/freetype/builds/rt-thread/gb2312tounicode.c @@ -895,7 +895,7 @@ rt_uint32_t gb2312tounicode(const rt_uint16_t key) if (key < 0x80) return key; if (key < 0xA1A1) - return -1; + return (rt_uint32_t)-1; sec = (lc >> 8) - 0xA0; @@ -911,11 +911,11 @@ rt_uint32_t gb2312tounicode(const rt_uint16_t key) return gb2312uni_table[key - ps->range[i].start + ps->range[i].offset]; } } - return -1; + return (rt_uint32_t)-1; } else if (sec < 16) /* No code in section 10~15. */ { - return -1; + return (rt_uint32_t)-1; } else if (sec < 88) /* Section 16~87. */ { @@ -926,7 +926,7 @@ rt_uint32_t gb2312tounicode(const rt_uint16_t key) { /* Section 55 only have chars up to 0xD7F9. */ if (sec == 55 && key > 0xD7F9) - return -1; + return (rt_uint32_t)-1; /* There are 682 chars before section 16 in GB2312(not GBK). And all * these sections are full(no wholes). */ code += 682; @@ -941,6 +941,6 @@ rt_uint32_t gb2312tounicode(const rt_uint16_t key) } else { - return -1; + return (rt_uint32_t)-1; } } -- GitLab