diff options
author | Bad Diode <bd@badd10de.dev> | 2021-05-20 22:18:28 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-05-20 22:18:28 +0200 |
commit | ab6fdd0347920cdcda9c4c3c9c3f01996adc48db (patch) | |
tree | 02f714fdf9a10be96e1eb82b5ebc5834d04c9259 /src/text.h | |
parent | 1d6395f1b6aafce4e2e05bcf60f335bec0a8d4b3 (diff) | |
download | uxngba-ab6fdd0347920cdcda9c4c3c9c3f01996adc48db.tar.gz uxngba-ab6fdd0347920cdcda9c4c3c9c3f01996adc48db.zip |
Apply asie's first performance patch
Diffstat (limited to 'src/text.h')
-rw-r--r-- | src/text.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 | ||