handle printf("%s\n", 0)

This commit is contained in:
rsc 2007-08-28 04:15:35 +00:00
parent 43baa1f224
commit b943284893

View file

@ -63,6 +63,8 @@ printf(int fd, char *fmt, ...)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;