From a4722b5981d3ceb13b0ab2a6bd969f3c22b27a26 Mon Sep 17 00:00:00 2001 From: Dozingfiretruck <1473454180@qq.com> Date: Mon, 28 Jul 2025 15:51:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:eink=20draw=E5=87=BD=E6=95=B0=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/eink/luat_lib_eink.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/components/eink/luat_lib_eink.c b/components/eink/luat_lib_eink.c index a6c34940a..d6d49bdf6 100644 --- a/components/eink/luat_lib_eink.c +++ b/components/eink/luat_lib_eink.c @@ -1098,15 +1098,12 @@ static int l_eink_draw_gtfont_gb2312_gray(lua_State* L) { static int l_eink_draw_gtfont_utf8(lua_State *L) { unsigned char buf[128]; size_t len; - int i = 0; - uint8_t strhigh,strlow ; - uint16_t e,str; const char *fontCode = luaL_checklstring(L, 1,&len); unsigned char size = luaL_checkinteger(L, 2); int x = luaL_checkinteger(L, 3); int y = luaL_checkinteger(L, 4); for(;;){ - e = utf8_next((uint8_t)*fontCode); + uint16_t e = utf8_next((uint8_t)*fontCode); if ( e == 0x0ffff ) break; fontCode++; @@ -1127,16 +1124,13 @@ static int l_eink_draw_gtfont_utf8(lua_State *L) { static int l_eink_draw_gtfont_utf8_gray(lua_State* L) { unsigned char buf[2048]; size_t len; - int i = 0; - uint8_t strhigh,strlow ; - uint16_t e,str; const char *fontCode = luaL_checklstring(L, 1,&len); unsigned char size = luaL_checkinteger(L, 2); unsigned char font_g = luaL_checkinteger(L, 3); int x = luaL_checkinteger(L, 4); int y = luaL_checkinteger(L, 5); for(;;){ - e = utf8_next((uint8_t)*fontCode); + uint16_t e = utf8_next((uint8_t)*fontCode); if ( e == 0x0ffff ) break; fontCode++;