X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=ginge.git;a=blobdiff_plain;f=loader%2Fllibc.c;h=c19e11dd082839f8d3c538d4cf89daa578a9c58f;hp=3a0205ffefd8894684c254bbe06a1fd68e6f7344;hb=HEAD;hpb=88d814e3677c8b71a62382bf839f452960472cac diff --git a/loader/llibc.c b/loader/llibc.c index 3a0205f..c19e11d 100644 --- a/loader/llibc.c +++ b/loader/llibc.c @@ -168,7 +168,9 @@ void g_fprintf(int fd, const char *fmt, ...) if (*s == 'l' || *s == 'z') s++; // ignore for now if (*s == 's') { - char *ns = va_arg(ap, char *); + const char *ns = va_arg(ap, const char *); + if (ns == NULL) + ns = "(null)"; int len = strlen(ns); while (justify > len && left > 1) { *d++ = ' ';