From 53c04d0f46bb95c16493d4ef0d102f69c171d315 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 7 Jan 2021 14:49:58 +0100 Subject: Added non-NULL assertion --- libc/print.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libc') diff --git a/libc/print.c b/libc/print.c index 629a410..a9e21f6 100644 --- a/libc/print.c +++ b/libc/print.c @@ -36,6 +36,7 @@ int vsprintf(char *str, const char *format, va_list ap) // TODO: Improve this repetitive code if (buf == 's') { char *string = va_arg(ap, char *); + assert(string); append(str, string, i); i = strlen(str); } else if (buf == 'x') { -- cgit v1.2.3