[dev] [st] [PATCH] Set ESC_STR_END on a '\' character in a DCS.

From: Colona <colona_AT_ycc.fr>
Date: Wed, 7 May 2014 10:07:15 +0200

The strhandle() in the case '\\' below (line 2565) couldn’t be reached.
---
 st.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/st.c b/st.c
index baab589..13c2b01 100644
--- a/st.c
+++ b/st.c
_AT_@ -2448,6 +2448,9 @@ tputc(char *c, int len) {
 		    ISCONTROLC1(unicodep))) {
 			term.esc &= ~(ESC_START|ESC_STR);
 			term.esc |= ESC_STR_END;
+		} else if (width == 1 && ascii == '\\') {
+			term.esc &= ~ESC_STR;
+			term.esc |= ESC_STR_END;
 		} else if(strescseq.len + len < sizeof(strescseq.buf) - 1) {
 			memmove(&strescseq.buf[strescseq.len], c, len);
 			strescseq.len += len;
-- 
1.9.2
-- 
Ivan "Colona" Delalande
Received on Wed May 07 2014 - 10:07:15 CEST

This archive was generated by hypermail 2.3.0 : Wed May 07 2014 - 10:12:10 CEST