Commit de5236dc authored by Feng Xiao's avatar Feng Xiao Committed by GitHub

Merge pull request #1828 from sergiocampama/framework

Fixes the parsing of the proto-framework map file.
parents 2ba058c6 2ff93494
...@@ -223,7 +223,7 @@ bool ImportWriter::ProtoFrameworkCollector::ConsumeLine( ...@@ -223,7 +223,7 @@ bool ImportWriter::ProtoFrameworkCollector::ConsumeLine(
offset = proto_file_list.length(); offset = proto_file_list.length();
} }
StringPiece proto_file(proto_file_list, start, offset); StringPiece proto_file(proto_file_list, start, offset - start);
StringPieceTrimWhitespace(&proto_file); StringPieceTrimWhitespace(&proto_file);
if (proto_file.size() != 0) { if (proto_file.size() != 0) {
map<string, string>::iterator existing_entry = map<string, string>::iterator existing_entry =
......
...@@ -1306,7 +1306,8 @@ bool Parser::Finish() { ...@@ -1306,7 +1306,8 @@ bool Parser::Finish() {
return true; return true;
} }
// Force a newline onto the end to finish parsing. // Force a newline onto the end to finish parsing.
p_ = StringPiece(leftover_ + "\n"); leftover_ += "\n";
p_ = StringPiece(leftover_);
if (!ParseLoop()) { if (!ParseLoop()) {
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment