aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorMax Cai <maxtroy@google.com>2014-07-03 12:27:04 +0100
committerMax Cai <maxtroy@google.com>2014-07-03 12:27:04 +0100
commit1a46f49f5b41dc18db5a8f2c63b894c650887bc8 (patch)
treea3d364b72377d15f8fb73b955d4a1c2ab2509ea2 /java
parent94f522f907e3f34f70d9e7816b947e62fddbb267 (diff)
downloadexternal_protobuf-1a46f49f5b41dc18db5a8f2c63b894c650887bc8.zip
external_protobuf-1a46f49f5b41dc18db5a8f2c63b894c650887bc8.tar.gz
external_protobuf-1a46f49f5b41dc18db5a8f2c63b894c650887bc8.tar.bz2
Fix how getRepeatedFieldArrayLength works
Change-Id: I01921eff008a8e3f7b1fbeb653d15ff8038d3220
Diffstat (limited to 'java')
-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 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++;
}