mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-07 14:24:12 +08:00
换用calloc
This commit is contained in:
parent
c06f83642f
commit
6cd06ffb8b
@ -357,8 +357,7 @@ 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 = malloc( ACFONT_CANVAS_MEMSIZE(width, gblfont.height) );
|
||||
memset(canvas, 0, ACFONT_CANVAS_MEMSIZE(width, gblfont.height));
|
||||
acf_rectedge_t *canvas = calloc( ACFONT_CANVAS_MEMSIZE(width, gblfont.height) );
|
||||
|
||||
for (const char *next = next_unicode(utf8_line, &unicode);
|
||||
next != NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user