[dev] [st patch queue 11/12] Fix for multibyte characters in techo.

From: noname <noname_AT_inventati.org>
Date: Fri, 25 Apr 2014 18:28:00 +0400

Works for both signed and unsigned char.
---
 st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/st.c b/st.c
index 22ce4fb..cb95b8c 100644
--- a/st.c
+++ b/st.c
_AT_@ -2292,7 +2292,7 @@ techo(char *buf, int len) {
 	for(; len > 0; buf++, len--) {
 		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') {
 				c ^= '\x40';
 				tputc("^", 1);
-- 
1.8.4
Received on Fri Apr 25 2014 - 16:28:00 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 25 2014 - 16:36:42 CEST