哈哈,改回malloc

This commit is contained in:
anod 2023-03-12 14:43:40 +08:00
parent 6cd06ffb8b
commit 0f21bb6094

View File

@ -357,7 +357,8 @@ acf_canvas_t acf_get_canvas(acf_rectedge_t width, acf_text_t text, acf_rectedge_
int rendered_count = 0; int rendered_count = 0;
const char *utf8_line = text; 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); for (const char *next = next_unicode(utf8_line, &unicode);
next != NULL; next != NULL;