summaryrefslogtreecommitdiff
path: root/tools/include/nolibc/stdio.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/include/nolibc/stdio.h')
-rw-r--r--tools/include/nolibc/stdio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h
index cb4d3ab3a565..559ebe052a75 100644
--- a/tools/include/nolibc/stdio.h
+++ b/tools/include/nolibc/stdio.h
@@ -220,6 +220,8 @@ int vfprintf(FILE *stream, const char *fmt, va_list args)
}
else if (c == 's') {
outstr = va_arg(args, char *);
+ if (!outstr)
+ outstr="(null)";
}
else if (c == '%') {
/* queue it verbatim */