diff options
| author | Axel Wagner <mail@merovius.de> | 2010-07-15 14:13:25 +0200 | 
|---|---|---|
| committer | Michael Stapelberg <michael@stapelberg.de> | 2010-07-15 15:12:48 +0200 | 
| commit | d8b6f031447434c88bc7d5eb1303c14d51e14238 (patch) | |
| tree | cf1e160d28f60b0e4157426e4583f6e7a82d6616 /src | |
| parent | c16d032512490b3aeb97db3d8d7cd99d333573b0 (diff) | |
print_ddate(): Correctly seperate the St. Tibs String from the rest
Diffstat (limited to 'src')
| -rw-r--r-- | src/print_ddate.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| 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++; | 
