From 395a7296fb899d237c4ee941c076a61752aeb59e Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Sat, 22 Oct 2022 22:25:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E6=98=AF=E4=BF=AE=E5=A4=8D=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9C=9F=E5=AE=9E=E5=AE=BD=E5=BA=A6=E7=9A=84canvas?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/acf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/arm11/acf.c b/source/arm11/acf.c index cfbbca6..9010652 100644 --- a/source/arm11/acf.c +++ b/source/arm11/acf.c @@ -328,7 +328,6 @@ acf_canvas_t acf_use_canvas(acf_canvas_t canvas, acf_boolean_t use_rwidth, acf_v register acf_rectedge_t width = ACFONT_CANVAS_WIDTH(canvas), height = gblfont.height; register acf_rectedge_t loop_width = use_rwidth ? ACFONT_CANVAS_RWIDTH(canvas) : width; - if( use_rwidth && loop_width > width ) loop_width = width; for( acf_position_t i=0; i < height; i++ ) { acf_position_t dy = height - 1 - i; @@ -386,7 +385,7 @@ acf_canvas_t acf_get_canvas(acf_rectedge_t width, acf_text_t text, acf_rectedge_ if( rest != NULL ) *rest = utf8_line; *canvas = width; - *(canvas+1) = linex; + *(canvas+1) = linex < width ? linex : width; fClose(font); return canvas;