diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2017-09-12 11:36:38 -0700 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2017-09-12 11:36:38 -0700 |
commit | 1d444f63d38af7f7f34f71670677e9fe970ca8bd (patch) | |
tree | 1880a9bf9a388477730d3e1de9e42fb583fb0d44 /src | |
parent | 5fa00630afaaf676595bebbc7348c960d6c0de5a (diff) | |
download | flatbuffers-1d444f63d38af7f7f34f71670677e9fe970ca8bd.tar.gz flatbuffers-1d444f63d38af7f7f34f71670677e9fe970ca8bd.tar.bz2 flatbuffers-1d444f63d38af7f7f34f71670677e9fe970ca8bd.zip |
Fixed .proto not being accepted as schema file.
Change-Id: I1ccd52a847930fa636d24f9490d57577b8775d08
Diffstat (limited to 'src')
-rw-r--r-- | src/flatc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/flatc.cpp b/src/flatc.cpp index 4d6f997e..405cc6d5 100644 --- a/src/flatc.cpp +++ b/src/flatc.cpp @@ -292,7 +292,8 @@ int FlatCompiler::Compile(int argc, const char** argv) { bool is_binary = static_cast<size_t>(file_it - filenames.begin()) >= binary_files_from; - auto is_schema = flatbuffers::GetExtension(filename) == "fbs"; + auto ext = flatbuffers::GetExtension(filename); + auto is_schema = ext == "fbs" || ext == "proto"; if (is_binary) { parser->builder_.Clear(); parser->builder_.PushFlatBuffer( |