grep: import $ fix from plan 9

R=rsc
http://codereview.appspot.com/4673053
This commit is contained in:
Russ Cox 2011-07-10 20:01:15 -04:00
parent 29fba8562c
commit ce5fdeb446

View file

@ -114,8 +114,14 @@ loop:
break; break;
case Tend: case Tend:
if(c == '\n') if(c == '\n') {
matched = 1; if(r->next == 0) {
matched = 1;
break;
}
r = r->next;
goto loop;
}
break; break;
case Tclass: case Tclass: