diff --git a/codegen/preprocessor/main.cc b/codegen/preprocessor/main.cc index 23f0264a57d..96056e79d31 100644 --- a/codegen/preprocessor/main.cc +++ b/codegen/preprocessor/main.cc @@ -34,6 +34,7 @@ std::unique_ptr ReadModelFile(const char* model_file_name) { model_file.seekg(0, std::ios::end); size_t num_bytes = model_file.tellg(); + model_file.seekg(0,std::ios::beg); std::unique_ptr model_data(new char[num_bytes]); model_file.read(model_data.get(), num_bytes);