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:
+2
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user