libc/puts: newline was omitted for empty string
`puts("");` did not print a newline. The standard
behavior is to print a newline even if the string
is empty.
Signed-off-by: liamHowatt <liamjmh0@gmail.com>
This commit is contained in:
parent
6135892d66
commit
0bdc9d24ab
1 changed files with 1 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ int puts(FAR const IPTR char *s)
|
|||
/* Write the string without its trailing '\0' */
|
||||
|
||||
nwritten = fputs_unlocked(s, stream);
|
||||
if (nwritten > 0)
|
||||
if (nwritten >= 0)
|
||||
{
|
||||
/* Followed by a newline */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue