aboutsummaryrefslogtreecommitdiffstats
path: root/util/log.c
diff options
context:
space:
mode:
authorturret <turret@duck.com>2024-03-30 21:23:48 -0500
committerturret <turret@duck.com>2024-03-30 21:23:48 -0500
commite9cf9c79ff159b59cfc61887ad8a69164785a1c9 (patch)
tree4fb3800fddcce1e7d6e4df4a9c376c516e391aaa /util/log.c
parentff9add1ee175bbf67ce9aeed5fbe11c175bc4ed7 (diff)
downloaddiscord-bot-skeleton-e9cf9c79ff159b59cfc61887ad8a69164785a1c9.tar.gz
discord-bot-skeleton-e9cf9c79ff159b59cfc61887ad8a69164785a1c9.tar.bz2
discord-bot-skeleton-e9cf9c79ff159b59cfc61887ad8a69164785a1c9.zip
log: increase buffer size
Diffstat (limited to 'util/log.c')
-rw-r--r--util/log.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/util/log.c b/util/log.c
index afbc2e3..de80ec4 100644
--- a/util/log.c
+++ b/util/log.c
@@ -78,10 +78,9 @@ static int vaprint(const char *fmt, va_list ap)
/* we essentially print the user's raw input to its own buffer,
later we will parse it and print out ANSI colors and what not */
- char buf[512];
+ char *buf = malloc(1<<16);
- vsnprintf(buf, 512, fmt, ap);
- buf[512 - 1] = '\0';
+ vsnprintf(buf, 1<<16, fmt, ap);
size_t colon = 0;
if(parsecolon) {