From ab6fdd0347920cdcda9c4c3c9c3f01996adc48db Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Thu, 20 May 2021 22:18:28 +0200 Subject: Apply asie's first performance patch --- src/text.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/text.h') diff --git a/src/text.h b/src/text.h index 0b318bb..eb6149d 100644 --- a/src/text.h +++ b/src/text.h @@ -255,7 +255,10 @@ txt_printf(char *msg, ...) { va_list arg_list; va_start(arg_list, msg); char buf[512] = {0}; - vsprintf(buf, msg, arg_list); + // TODO: This call pulls in malloc() and a bunch of other things. + // To reduce memory usage and filesize, it would be advisable + // to replace it with something simpler. + vsiprintf(buf, msg, arg_list); txt_puts(buf); } -- cgit v1.2.1