From 49365e2d22f8dd46d41c98f8a172c9078dfc62b6 Mon Sep 17 00:00:00 2001 From: nick black Date: Fri, 1 Oct 2021 17:10:13 -0400 Subject: [PATCH] decrpm_asu_cb: correct follow --- src/lib/in.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/in.c b/src/lib/in.c index 47e5bfb09..ecd4921cc 100644 --- a/src/lib/in.c +++ b/src/lib/in.c @@ -320,8 +320,9 @@ amata_next_numeric(automaton* amata, const char* prefix, char follow){ ret += addend; ++amata->matchstart; } - if(*amata->matchstart++ != follow){ - logerror("didn't see follow (%c)\n", follow); + char candidate = *amata->matchstart++; + if(candidate != follow){ + logerror("didn't see follow (%c vs %c)\n", candidate, follow); return 0; } return ret; @@ -659,7 +660,7 @@ kittygraph_cb(inputctx* ictx){ static int decrpm_asu_cb(inputctx* ictx){ - unsigned ps = amata_next_numeric(&ictx->amata, "\x1b[?2026;", 'y'); + unsigned ps = amata_next_numeric(&ictx->amata, "\x1b[?2026;", '$'); loginfo("received decrpm 2026 %u\n", ps); if(ps == 2){ if(ictx->initdata){