From d8b6f031447434c88bc7d5eb1303c14d51e14238 Mon Sep 17 00:00:00 2001 From: Axel Wagner Date: Thu, 15 Jul 2010 14:13:25 +0200 Subject: print_ddate(): Correctly seperate the St. Tibs String from the rest --- src/print_ddate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/print_ddate.c') diff --git a/src/print_ddate.c b/src/print_ddate.c index 6f97147..16923b2 100644 --- a/src/print_ddate.c +++ b/src/print_ddate.c @@ -143,12 +143,12 @@ int format_output(char *format, struct disc_time *dt) { printf("St. Tib's Day"); } else { /* ...or parse the substring between %{ and %} ... */ - *i = '\0'; + *tibs_end = '\0'; if (!format_output(i + 2, dt)) return 0; - *i = '%'; + *tibs_end = '%'; } /* ...and continue with the rest */ - i = tibs_end + 2; + i = tibs_end; break; case '}': i++; -- cgit v1.2.3