Sun, 06 Oct 2024 19:45:34 +0200
fix memory leak in asc_text_printf()
src/text.c | file | annotate | diff | comparison | revisions |
--- a/src/text.c Sun Oct 06 19:43:08 2024 +0200 +++ b/src/text.c Sun Oct 06 19:45:34 2024 +0200 @@ -113,10 +113,14 @@ char const* format, ... ) { - cxmutstr text = ((AscText*)node)->text; va_list ap; va_start(ap, format); - cx_vsprintf(&text.ptr, &text.length, format, ap); + cx_vsprintf( + &(((AscText*)node)->text.ptr), + &(((AscText*)node)->text.length), + format, + ap + ); va_end(ap); asc_node_update(node); }