print_ddate(): Correctly seperate the St. Tibs String from the rest

This commit is contained in:
Axel Wagner 2010-07-15 14:13:25 +02:00 committed by Michael Stapelberg
parent c16d032512
commit d8b6f03144

View File

@ -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++;