![christos](/assets/img/avatar_default.png)
- I have added a call to memset() to clear the mbibuff on each loop. Since we're dealing with possibly broken multibyte sequences, clearing it will avoid problems with a new input sequence possibly being confused by extra bytes still there from the last iteration. wctomb(), which is used to fill that buffer, does not append a NUL. - I have added a (char) cast when copying single bytes into the input buffer after a multibyte conversion error. - In the call to strvisx() the count must be 1, not mbilen which can be 2 or 3 etc for a multibyte character. This value is a count of characters - not bytes - to process. It even says characters in the man page. In vis(3) I am interpreting this value to mean multibyte characters.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
Description
No description provided
Languages
C
85.3%
Roff
7.2%
Assembly
3.1%
Shell
1.7%
Makefile
1.2%
Other
0.9%