mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 06:18:40 +08:00
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…
Reference in a new issue