aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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++;
}