Browse Source

Fix for multibyte characters in techo.

Works for both signed and unsigned char.
master
noname 10 years ago
committed by Roberto E. Vargas Caballero
parent
commit
c4b79b055d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      st.c

+ 1
- 1
st.c View File

@ -2298,7 +2298,7 @@ techo(char *buf, int len) {
for(; len > 0; buf++, len--) { for(; len > 0; buf++, len--) {
char c = *buf; char c = *buf;
if(c < 0x20 || c == 0177) { /* control code */
if(BETWEEN(c, 0x00, 0x1f) || c == 0x7f) { /* control code */
if(c != '\n' && c != '\r' && c != '\t') { if(c != '\n' && c != '\r' && c != '\t') {
c ^= '\x40'; c ^= '\x40';
tputc("^", 1); tputc("^", 1);


Loading…
Cancel
Save