Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2025-12-05 00:01:08 +00:00
commit 1a3db6b65e
2 changed files with 2 additions and 3 deletions

View File

@ -1104,8 +1104,6 @@ format_width(const char *expanded)
more = utf8_append(&ud, *cp); more = utf8_append(&ud, *cp);
if (more == UTF8_DONE) if (more == UTF8_DONE)
width += ud.width; width += ud.width;
else
cp -= ud.have;
} else if (*cp > 0x1f && *cp < 0x7f) { } else if (*cp > 0x1f && *cp < 0x7f) {
width++; width++;
cp++; cp++;

View File

@ -5545,7 +5545,8 @@ format_expand1(struct format_expand_state *es, const char *fmt)
buf[off++] = *fmt++; buf[off++] = *fmt++;
continue; continue;
} }
fmt++; if (*fmt++ == '\0')
break;
ch = (u_char)*fmt++; ch = (u_char)*fmt++;
switch (ch) { switch (ch) {