Commit f9a4fef6 authored by Josh Triplett's avatar Josh Triplett Committed by Craig Small

watch: Fix ANSI escape sequence termination

process_ansi stopped processing an ANSI escape sequence if
(c < '0' && c > '9' && c != ';'), which will never happen.  Fix the
range check to use || instead.
Signed-off-by: Josh Triplett's avatarJosh Triplett <josh@joshtriplett.org>
parent 261c571a
......@@ -216,7 +216,7 @@ static void process_ansi(FILE * fp)
buf[i] = '\0';
break;
}
if (c < '0' && c > '9' && c != ';') {
if ((c < '0' || c > '9') && c != ';') {
while (--i >= 0)
ungetc(buf[i], fp);
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment