summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2017-09-12 11:36:38 -0700
committerWouter van Oortmerssen <aardappel@gmail.com>2017-09-12 11:36:38 -0700
commit1d444f63d38af7f7f34f71670677e9fe970ca8bd (patch)
tree1880a9bf9a388477730d3e1de9e42fb583fb0d44 /src
parent5fa00630afaaf676595bebbc7348c960d6c0de5a (diff)
downloadflatbuffers-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.cpp3
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(