diff options
author | Max Cai <maxtroy@google.com> | 2014-08-07 10:40:43 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-05 00:20:55 +0000 |
commit | a76831c3629c3c1a9900984f3aea6306dbf0734c (patch) | |
tree | 298bf379e2d05489ab6d5907221d22778bb1e885 | |
parent | 4d11e705cb073e55283452e6fd50e3feff54f82c (diff) | |
parent | 1a46f49f5b41dc18db5a8f2c63b894c650887bc8 (diff) | |
download | external_protobuf-a76831c3629c3c1a9900984f3aea6306dbf0734c.zip external_protobuf-a76831c3629c3c1a9900984f3aea6306dbf0734c.tar.gz external_protobuf-a76831c3629c3c1a9900984f3aea6306dbf0734c.tar.bz2 |
Merge "Fix how getRepeatedFieldArrayLength works"
-rw-r--r-- | java/src/main/java/com/google/protobuf/nano/WireFormatNano.java | 6 |
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 1ff8f06..a3405e5 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++; } |