diff --git a/src/flatc.cpp b/src/flatc.cpp index 4d6f997e0..405cc6d51 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(