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:
parent
3f8592772f
commit
9cefeeb423
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue