aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Cai <maxtroy@google.com>2014-08-07 10:40:43 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-08-05 00:20:55 +0000
commitec0e1c00e0fe6a3c92a6ba70e52d0ab502ff5fbf (patch)
treedbb8abe3f82dcd8e5419983ff33160ce85dfa03f
parenta1742318376139c7874c6b9deea183673e98d2f0 (diff)
parent9ceb3d4acc1051563084763883938fd3c4b98ecb (diff)
downloadprotobuf-ec0e1c00e0fe6a3c92a6ba70e52d0ab502ff5fbf.tar.gz
protobuf-ec0e1c00e0fe6a3c92a6ba70e52d0ab502ff5fbf.tar.bz2
protobuf-ec0e1c00e0fe6a3c92a6ba70e52d0ab502ff5fbf.zip
Merge "Fix how getRepeatedFieldArrayLength works"
-rw-r--r--java/src/main/java/com/google/protobuf/nano/WireFormatNano.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java b/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java
index 1ff8f06f..a3405e55 100644
--- a/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java
+++ b/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java
@@ -113,11 +113,7 @@ public final class WireFormatNano {
int arrayLength = 1;
int startPos = input.getPosition();
input.skipField(tag);
- while (input.getBytesUntilLimit() > 0) {
- int thisTag = input.readTag();
- if (thisTag != tag) {
- break;
- }
+ while (input.readTag() == tag) {
input.skipField(tag);
arrayLength++;
}