aboutsummaryrefslogtreecommitdiffstats
path: root/src/text.h
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-05-20 22:18:28 +0200
committerBad Diode <bd@badd10de.dev>2021-05-20 22:18:28 +0200
commitab6fdd0347920cdcda9c4c3c9c3f01996adc48db (patch)
tree02f714fdf9a10be96e1eb82b5ebc5834d04c9259 /src/text.h
parent1d6395f1b6aafce4e2e05bcf60f335bec0a8d4b3 (diff)
downloaduxngba-ab6fdd0347920cdcda9c4c3c9c3f01996adc48db.tar.gz
uxngba-ab6fdd0347920cdcda9c4c3c9c3f01996adc48db.zip
Apply asie's first performance patch
Diffstat (limited to 'src/text.h')
-rw-r--r--src/text.h5
1 files changed, 4 insertions, 1 deletions
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, ...) {
255 va_list arg_list; 255 va_list arg_list;
256 va_start(arg_list, msg); 256 va_start(arg_list, msg);
257 char buf[512] = {0}; 257 char buf[512] = {0};
258 vsprintf(buf, msg, arg_list); 258 // TODO: This call pulls in malloc() and a bunch of other things.
259 // To reduce memory usage and filesize, it would be advisable
260 // to replace it with something simpler.
261 vsiprintf(buf, msg, arg_list);
259 txt_puts(buf); 262 txt_puts(buf);
260} 263}
261 264