From 1d444f63d38af7f7f34f71670677e9fe970ca8bd Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Tue, 12 Sep 2017 11:36:38 -0700 Subject: Fixed .proto not being accepted as schema file. Change-Id: I1ccd52a847930fa636d24f9490d57577b8775d08 --- src/flatc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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(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( -- cgit v1.2.3