diff options
Diffstat (limited to 'src/format.c')
| -rw-r--r-- | src/format.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/format.c b/src/format.c index 47426ec..4657359 100644 --- a/src/format.c +++ b/src/format.c @@ -31,8 +31,9 @@ bool format_init(format_t *format, const char *string, char delim) // TODO: Escape formatting if (string[end + 1] == '{') { + format_grow(); + if (start != end) { - format_grow(); parts[n] = strslice(string, start, end); marks[n] = false; n++; @@ -70,7 +71,7 @@ bool format_init(format_t *format, const char *string, char delim) next: } - if (string[end] != '\0') { + if (start != end || string[end] != '\0') { while (string[end] != '\0') end++; format_grow(); @@ -108,7 +109,7 @@ bool format_remark(format_t *format, const char *label, const format_pair_t *pai errors++; if (label != NULL) - log_error("Unknown format option '%s' for %s", format->parts[i], label); + log_error("Unknown format option '%s' for block '%s'", format->parts[i], label); next: } |
