Treat unclosed containers at EOF as an error after all

This commit is contained in:
Eric Fischer 2014-02-06 13:20:56 -08:00
parent 6449e817b6
commit 55692cb27c

View File

@ -116,11 +116,10 @@ again:
c = getc(f);
if (c == EOF) {
if (current != NULL) {
// Close out open containers
return current->parent;
} else {
return NULL;
*error = "Reached EOF without all containers being closed";
}
return NULL;
}
} while (c == ' ' || c == '\t' || c == '\r' || c == '\n');