diff options
author | Jim Meyering <jim@meyering.net> | 2005-12-15 20:15:20 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-12-15 20:15:20 +0000 |
commit | ce79c562f680b0247849a1ae2943699073371b70 (patch) | |
tree | 4dcd625308c9fb5b826d0fbeb0b1fbd90f13b6ad /src | |
parent | 41e95465a61454e0e80da21e2bf8a7c0bc249167 (diff) | |
download | coreutils-ce79c562f680b0247849a1ae2943699073371b70.tar.xz |
(print_it): Properly handle a backslash at the
end of a --printf format string. Reported by Paul Eggert.
Diffstat (limited to 'src')
-rw-r--r-- | src/stat.c | 7 |
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); |