From 48efc50c23a957ae8908a32bf50d386a8098cea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 10 Jul 2019 16:04:25 +0200 Subject: [PATCH] vt: escape '\E' properly when logging an ESC sequence --- vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vt.c b/vt.c index a781329f..1d5a9b93 100644 --- a/vt.c +++ b/vt.c @@ -571,7 +571,7 @@ static const char * esc_as_string(struct terminal *term, uint8_t final) { static char msg[1024]; - int c = snprintf(msg, sizeof(msg), "\E"); + int c = snprintf(msg, sizeof(msg), "\\E"); if (term->vt.private != 0) c += snprintf(&msg[c], sizeof(msg) - c, "%c", term->vt.private);