Browse Source

fix:drawGtfontGbk栈溢出死机问题

Dozingfiretruck 5 tháng trước cách đây
mục cha
commit
c21f110903
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      components/lcd/luat_lib_lcd.c

+ 1 - 1
components/lcd/luat_lib_lcd.c

@@ -1260,7 +1260,7 @@ static int l_lcd_draw_gtfont_gbk(lua_State *L) {
         LLOGE("lcd not init");
         return 0;
     }
-    int buff_size = size*size/8;
+    int buff_size = size*size/8+512;
     unsigned char* buf = luat_heap_malloc(buff_size);
     if (buf == NULL){
         LLOGE("malloc error");