Selaa lähdekoodia

fix:drawGtfontGbk栈溢出死机问题

Dozingfiretruck 5 kuukautta sitten
vanhempi
sitoutus
c21f110903
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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");