expect returns as early as possible. read_directive might have missed a newline

in unmatched character that has consumed by expect
This commit is contained in:
Yuichi Nishiwaki 2014-07-19 11:51:37 +09:00
parent 3f8592772f
commit 9cefeeb423
1 changed files with 2 additions and 1 deletions

View File

@ -55,8 +55,9 @@ expect(struct pic_port *port, const char *str)
char c;
while ((c = *str++) != 0) {
if (c != next(port))
if (c != peek(port))
return false;
next(port);
}
return true;