summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2024-07-25 12:23:33 +0200
committerMitya Selivanov <automainint@guattari.tech>2024-07-25 12:23:33 +0200
commitc92dff1ea9d864c3181cc3a662741b3a4ea53a8b (patch)
tree5903e62e5addf6b4e557c3edccdbe30fa28624ed
parentafa9010d342c1a2d4036e60a5ce22d9d07ec99d6 (diff)
downloadbxgen-c92dff1ea9d864c3181cc3a662741b3a4ea53a8b.zip
Cleanup
-rwxr-xr-xbxgen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bxgen.c b/bxgen.c
index 7adc09a..eb1887c 100755
--- a/bxgen.c
+++ b/bxgen.c
@@ -2913,11 +2913,11 @@ void bx_log(i32 log_level, u32 line, c8 *file, c8 *format, ...) {
return;
}
- c8 message[256];
+ c8 message[256] = {0};
va_list ap;
va_start(ap, format);
- vsprintf(message, format, ap);
+ vsnprintf(message, sizeof message, format, ap);
va_end(ap);
fflush(stdout);
@@ -3230,7 +3230,7 @@ int main(int argc, char **argv) {
mainproc,
CONV_CDECL, // calling convention
"printf", // proc name
- 1, // number of argument
+ 1, // number of arguments
(Var[]) {{
// the first argument
.num = 1,