From 82ee6d5cdb37d2f5d0d6b5ac0f49e0efdbdf7342 Mon Sep 17 00:00:00 2001 From: anon Date: Thu, 3 Aug 2023 11:57:25 +0200 Subject: [PATCH] raw() werks --- src/api.c | 2 +- src/irc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api.c b/src/api.c index f31d207..fec5a7d 100644 --- a/src/api.c +++ b/src/api.c @@ -115,7 +115,7 @@ DECL char * raw(const char * const sql) { char* errmsg; - char* r = (char*)malloc(10000); + char* r = (char*)calloc(sizeof(char), 10000); // TODO: allow for reallocing in rtos, start with a smaller value DBUSERERR(sqlite3_exec(connection, sql, rtos, &r, &errmsg)); if (errmsg){ free(r); diff --git a/src/irc.c b/src/irc.c index bae91d3..807138c 100644 --- a/src/irc.c +++ b/src/irc.c @@ -63,7 +63,7 @@ ircmsg(const char* fmt, { exit(1); } puts(fmtdmsg); - IRCMSG(fmtdmsg); + IRCMSG(fmtdmsg); // TODO: make it send the message line by line free(fmtdmsg); va_end(args);