From 0f21bb6094be0f8037e7d8e5800467034f6c13c7 Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Sun, 12 Mar 2023 14:43:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=93=88=E5=93=88=EF=BC=8C=E6=94=B9=E5=9B=9Ema?= =?UTF-8?q?lloc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/acf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/arm11/acf.c b/source/arm11/acf.c index 6c5d173..0be4c1d 100644 --- a/source/arm11/acf.c +++ b/source/arm11/acf.c @@ -357,7 +357,8 @@ acf_canvas_t acf_get_canvas(acf_rectedge_t width, acf_text_t text, acf_rectedge_ int rendered_count = 0; const char *utf8_line = text; - acf_rectedge_t *canvas = calloc( ACFONT_CANVAS_MEMSIZE(width, gblfont.height) ); + acf_rectedge_t *canvas = malloc( ACFONT_CANVAS_MEMSIZE(width, gblfont.height) ); + memset( canvas, 0, ACFONT_CANVAS_MEMSIZE(width, gblfont.height) ); for (const char *next = next_unicode(utf8_line, &unicode); next != NULL;