diff options
author | Feng Xiao <xiaofeng@google.com> | 2016-07-22 20:51:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-22 20:51:13 +0000 |
commit | de5236dc9f7cee4ea3f1eaa39c45f97e9974048d (patch) | |
tree | 6e699dac3d5b040b25043ba18d44500b486113b1 /src/google | |
parent | 2ba058c66c10781d57a332987be23e3fed0f9e1c (diff) | |
parent | 2ff93494a7edff2b00eaaf0982de11420740be52 (diff) | |
download | protobuf-de5236dc9f7cee4ea3f1eaa39c45f97e9974048d.tar.gz protobuf-de5236dc9f7cee4ea3f1eaa39c45f97e9974048d.tar.bz2 protobuf-de5236dc9f7cee4ea3f1eaa39c45f97e9974048d.zip |
Merge pull request #1828 from sergiocampama/framework
Fixes the parsing of the proto-framework map file.
Diffstat (limited to 'src/google')
-rw-r--r-- | src/google/protobuf/compiler/objectivec/objectivec_file.cc | 2 | ||||
-rw-r--r-- | src/google/protobuf/compiler/objectivec/objectivec_helpers.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_file.cc b/src/google/protobuf/compiler/objectivec/objectivec_file.cc index cf8c34e1..b864ef12 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_file.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_file.cc @@ -223,7 +223,7 @@ bool ImportWriter::ProtoFrameworkCollector::ConsumeLine( 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); if (proto_file.size() != 0) { map<string, string>::iterator existing_entry = diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc index 311bf35d..22c7a883 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc @@ -1306,7 +1306,8 @@ bool Parser::Finish() { return true; } // Force a newline onto the end to finish parsing. - p_ = StringPiece(leftover_ + "\n"); + leftover_ += "\n"; + p_ = StringPiece(leftover_); if (!ParseLoop()) { return false; } |