summary refs log tree commit diff
path: root/src/bltin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bltin')
-rw-r--r--src/bltin/printf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bltin/printf.c b/src/bltin/printf.c
index 1112253..a626cee 100644
--- a/src/bltin/printf.c
+++ b/src/bltin/printf.c
@@ -459,7 +459,7 @@ echocmd(int argc, char **argv)
 
 		if (likely(*argv))
 			nonl += print_escape_str("%s", NULL, NULL, *argv++);
-		if (nonl > 0)
+		if (likely((nonl + !*argv) > 1))
 			break;
 
 		c = *argv ? ' ' : '\n';