mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +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());
|
||||
ECHECK(SkipByteOrderMark());
|
||||
NEXT();
|
||||
|
||||
if (Is(kTokenEof))
|
||||
return Error("input file is empty");
|
||||
|
||||
// Includes must come before type declarations:
|
||||
for (;;) {
|
||||
// Parse pre-include proto statements if any:
|
||||
|
||||
Reference in New Issue
Block a user