diff options
Diffstat (limited to 'Src/watch.c')
-rw-r--r-- | Src/watch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/watch.c b/Src/watch.c index 2532e0a63..6fe77afcd 100644 --- a/Src/watch.c +++ b/Src/watch.c @@ -235,7 +235,7 @@ watchlog2(int inout, WATCH_STRUCT_UTMP *u, char *fmt, int prnt, int fini) # endif /* WATCH_UTMP_UT_HOST */ while (*fmt) - if (*fmt == '\\') + if (*fmt == '\\') { if (*++fmt) { if (prnt) putchar(*fmt); @@ -244,6 +244,7 @@ watchlog2(int inout, WATCH_STRUCT_UTMP *u, char *fmt, int prnt, int fini) return fmt; else break; + } else if (*fmt == fini) return ++fmt; else if (*fmt != '%') { |