diff options
author | Leah Neukirchen <leah@vuxu.org> | 2018-09-14 13:25:59 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2018-09-14 13:25:59 +0200 |
commit | 82faec5cfed1da6b4bd1d770fdcd214cca7f1050 (patch) | |
tree | d2d1ca0e89262396854914daff6dedb460526a7d | |
parent | 1336ea5512afb81bd9de75a3062ccca40c8b9dbb (diff) | |
download | mblaze-82faec5cfed1da6b4bd1d770fdcd214cca7f1050.tar.gz mblaze-82faec5cfed1da6b4bd1d770fdcd214cca7f1050.tar.xz mblaze-82faec5cfed1da6b4bd1d770fdcd214cca7f1050.zip |
mscan: u8putstr: take length of replacement char into account
-rw-r--r-- | mscan.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mscan.c b/mscan.c index 2919743..5742ce8 100644 --- a/mscan.c +++ b/mscan.c @@ -52,6 +52,7 @@ u8putstr(FILE *out, char *s, ssize_t l, int pad) int r = u8decode(s, &c); if (r < 0) { r = 1; + l--; fprintf(out, "%lc", (wint_t)replacement); } else { l -= wcwidth((wchar_t)c); |