From f22cd2d21b68c3ac1ab198432200b386d290a5c1 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Fri, 14 Aug 2020 18:06:13 -0400 Subject: [PATCH] wtf was i thinking --- terminal.d | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/terminal.d b/terminal.d index 1494f30..5ae6fc1 100644 --- a/terminal.d +++ b/terminal.d @@ -4832,7 +4832,7 @@ class LineGetter { b = readOne(); // no big deal, just ignore and continue nextNumberY: - if(b >= '0' || b <= '9') { + if(b >= '0' && b <= '9') { y *= 10; y += b - '0'; } else goto nextEscape; @@ -4841,14 +4841,18 @@ class LineGetter { if(b != ';') goto nextNumberY; - nextNumberX: b = readOne(); - if(b >= '0' || b <= '9') { + nextNumberX: + if(b >= '0' && b <= '9') { x *= 10; x += b - '0'; } else goto nextEscape; b = readOne(); + // another digit + if(b >= '0' && b <= '9') + goto nextNumberX; + if(b != 'R') goto nextEscape; // it wasn't the right thing it after all