From 346a9f68b10f87148bdea98335753394515f51a9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 12 Dec 2017 18:38:52 +0530 Subject: [PATCH] Fix #227 --- kitty/cursor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kitty/cursor.c b/kitty/cursor.c index 72d85ff29..3aa3f5cdd 100644 --- a/kitty/cursor.c +++ b/kitty/cursor.c @@ -57,6 +57,9 @@ cursor_from_sgr(Cursor *self, unsigned int *params, unsigned int count) { break; \ case 2: \ if (i < count - 2) { \ + /* Ignore the first parameter in a four parameter RGB */ \ + /* sequence (unused color space id), see https://github.com/kovidgoyal/kitty/issues/227 */ \ + if (i < count - 3) i++; \ r = params[i++] & 0xFF; \ g = params[i++] & 0xFF; \ b = params[i++] & 0xFF; \