mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-07 14:24:12 +08:00
修正use_canvas的bug
This commit is contained in:
parent
cb79ee343e
commit
5657569af0
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user