diff options
author | Thomas Adam <thomas@xteddy.org> | 2020-01-08 16:01:23 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2020-01-08 16:01:23 +0000 |
commit | 61b075a26342a5ea1b2a351ad659c7198cd23c09 (patch) | |
tree | b5608b5f37414d0a1079ad24fbc68f62327a3fb4 | |
parent | ed16f51e26f4cae65adced80cca4640119c3cb37 (diff) | |
parent | 36eb16ce7db2db71b510964a2e453e6b349b03f0 (diff) |
Merge branch 'obsd-master'
-rw-r--r-- | format-draw.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/format-draw.c b/format-draw.c index 6cced9fd..bb16e0dd 100644 --- a/format-draw.c +++ b/format-draw.c @@ -849,8 +849,10 @@ format_trim_left(const char *expanded, u_int limit) out += ud.size; } width += ud.width; - } else + } else { cp -= ud.have; + cp++; + } } else if (*cp > 0x1f && *cp < 0x7f) { if (width + 1 <= limit) *out++ = *cp; @@ -896,8 +898,10 @@ format_trim_right(const char *expanded, u_int limit) out += ud.size; } width += ud.width; - } else + } else { cp -= ud.have; + cp++; + } } else if (*cp > 0x1f && *cp < 0x7f) { if (width >= skip) *out++ = *cp; |