summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stat.c b/src/stat.c
index 0773860ad..0ce83d173 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -665,6 +665,13 @@ print_it (char const *format, char const *filename,
}
putchar (esc_value);
}
+ else if (*b == '\0')
+ {
+ error (0, 0, _("warning: backslash at end of format"));
+ putchar ('\\');
+ /* Arrange to exit the loop. */
+ --b;
+ }
else
{
print_esc_char (*b);