From 5657569af0d379812f3b56f0eaa277f1a910ef29 Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Wed, 5 Oct 2022 09:57:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3use=5Fcanvas=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/acf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/arm11/acf.c b/source/arm11/acf.c index fc8765e..6cc9d73 100644 --- a/source/arm11/acf.c +++ b/source/arm11/acf.c @@ -356,7 +356,6 @@ acf_canvas_t acf_get_canvas(acf_rectedge_t width, acf_text_t text, acf_rectedge_ acf_rectedge_t *canvas = malloc( ACFONT_CANVAS_MEMSIZE(width, gblfont.height) ); memset(canvas, 0, ACFONT_CANVAS_MEMSIZE(width, gblfont.height)); - *canvas = width; for (const char *next = next_unicode(utf8_line, &unicode); next != NULL; @@ -381,6 +380,9 @@ acf_canvas_t acf_get_canvas(acf_rectedge_t width, acf_text_t text, acf_rectedge_ if( renderedcnt != NULL ) *renderedcnt = rendered_count; if( rest != NULL ) *rest = utf8_line; + *canvas = width; + *(canvas+1) = linex; + fClose(font); return canvas; }