From: Axel Wagner Date: Thu, 15 Jul 2010 12:13:25 +0000 (+0200) Subject: print_ddate(): Correctly seperate the St. Tibs String from the rest X-Git-Tag: 2.2~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d8b6f031447434c88bc7d5eb1303c14d51e14238;p=i3%2Fi3status print_ddate(): Correctly seperate the St. Tibs String from the rest --- 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++;