diff options
Diffstat (limited to 'toys/posix/paste.c')
-rw-r--r-- | toys/posix/paste.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/toys/posix/paste.c b/toys/posix/paste.c index 42e6a287..ea04f02e 100644 --- a/toys/posix/paste.c +++ b/toys/posix/paste.c @@ -42,7 +42,6 @@ static void paste_files(void) // Start of each line/file resets delimiter cycle dpos = TT.d; - mbtowc(0, 0, 0); for (i = any = dcount = dlen = 0; seq || i<TT.files; i++) { size_t blen; @@ -84,7 +83,7 @@ static void paste_files(void) } } } else { - while (0<(dlen = mbtowc(&wc, dpos, 99))) { + while (0<(dlen = utf8towc(&wc, dpos, 99))) { dpos += dlen; if (!(dlen = wcwidth(wc))) continue; if (dlen<0) dpos = dstr+1; |