Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2019-03-18 21:24:49 +00:00
15 changed files with 1338 additions and 561 deletions

View File

@ -988,7 +988,7 @@ found:
}
/* Skip until end. */
static const char *
const char *
format_skip(const char *s, const char *end)
{
int brackets = 0;
@ -1596,12 +1596,12 @@ done:
/* Truncate the value if needed. */
if (limit > 0) {
new = utf8_trimcstr(value, limit);
new = format_trim_left(value, limit);
format_log(ft, "applied length limit %d: %s", limit, new);
free(value);
value = new;
} else if (limit < 0) {
new = utf8_rtrimcstr(value, -limit);
new = format_trim_right(value, -limit);
format_log(ft, "applied length limit %d: %s", limit, new);
free(value);
value = new;