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