Prechádzať zdrojové kódy

fix:drawGtfontGbk栈溢出死机问题

Dozingfiretruck 5 mesiacov pred
rodič
commit
c21f110903
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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");