mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Fixed file_identifier/extension leaking from included file.
Change-Id: I470143411e4ce6322e018a27bcc9cd40c15d9bf1 Tested: on Linux.
This commit is contained in:
@@ -2216,9 +2216,11 @@ CheckedError Parser::DoParse(const char *source,
|
||||
name.c_str()));
|
||||
// We generally do not want to output code for any included files:
|
||||
if (!opts.generate_all) MarkGenerated();
|
||||
// Reset root type just in case the included file had one, and the
|
||||
// Reset these just in case the included file had them, and the
|
||||
// parent doesn't.
|
||||
root_struct_def_ = nullptr;
|
||||
file_identifier_.clear();
|
||||
file_extension_.clear();
|
||||
// This is the easiest way to continue this file after an include:
|
||||
// instead of saving and restoring all the state, we simply start the
|
||||
// file anew. This will cause it to encounter the same include
|
||||
|
||||
Reference in New Issue
Block a user