sw: puts: don't eat first character

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-03-25 18:59:57 +08:00
parent 3d6acaf51e
commit b0afd2b0ae

View File

@ -256,8 +256,13 @@ void tfp_sprintf(char *s, char *fmt, ...)
}
int puts(const char *s) {
while (*s++)
stdout_putf(stdout_putp, *s);
puts_noendl(s);
stdout_putf(stdout_putp, '\n');
return 1;
}
int puts_noendl(const char *s) {
while (*s)
stdout_putf(stdout_putp, *s++);
return 1;
}