mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-20 12:45:07 +00:00
NoError was returning on DoParse method when file was empty (#4208)
* NoError was returning on DoParse method when file was empty. * change NoError message in DoParse.
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
b8224809ad
commit
e7e4dc755d
@@ -1874,6 +1874,10 @@ CheckedError Parser::DoParse(const char *source, const char **include_paths,
|
|||||||
namespaces_.push_back(new Namespace());
|
namespaces_.push_back(new Namespace());
|
||||||
ECHECK(SkipByteOrderMark());
|
ECHECK(SkipByteOrderMark());
|
||||||
NEXT();
|
NEXT();
|
||||||
|
|
||||||
|
if (Is(kTokenEof))
|
||||||
|
return Error("input file is empty");
|
||||||
|
|
||||||
// Includes must come before type declarations:
|
// Includes must come before type declarations:
|
||||||
for (;;) {
|
for (;;) {
|
||||||
// Parse pre-include proto statements if any:
|
// Parse pre-include proto statements if any:
|
||||||
|
|||||||
Reference in New Issue
Block a user