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 <josh@joshtriplett.org>
This commit is contained in:
Josh Triplett authored and Craig Small committed 2016-07-09 14:55:11 +10:00
1 parent 261c571aca
commit f9a4fef6a9
1 file changed
+1 -1
+1 -1
View File
@@ -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;