From cf65141f154651115028d6456a1d7582d30b2083 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sat, 30 May 2020 15:09:33 -0700 Subject: many bug fixes --- sys/libn/error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/libn/error.c') diff --git a/sys/libn/error.c b/sys/libn/error.c index 9b6a28a..5595457 100644 --- a/sys/libn/error.c +++ b/sys/libn/error.c @@ -20,8 +20,8 @@ panicf(byte* fmt, ...) int n; va_list args; static byte buf[4*1024]; - va_start(args, fmt); + va_start(args, fmt); buf[0] = 'p'; buf[1] = 'a'; buf[2] = 'n'; @@ -32,7 +32,7 @@ panicf(byte* fmt, ...) n = vsnprintf(buf+7, arrlen(buf)-8, fmt, args); if (n < 0) return; - buf[n] = 0; + buf[n+7] = 0; perror(buf); va_end(args); -- cgit v1.2.1