소스 검색

fix:drawGtfontGbk栈溢出死机问题

Dozingfiretruck 5 달 전
부모
커밋
c21f110903
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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");