Skip to content

Commit 2c20760

Browse files
committed
tiny cleanup
1 parent 4cb96e0 commit 2c20760

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

protobuf/src/main/java/com/fasterxml/jackson/dataformat/protobuf/ProtobufGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ protected void _writeEnum(String str) throws IOException
954954
// basically, _writeVInt, but very likely to be very short; but if not:
955955
final int tag = _currField.typedTag;
956956
int ptr = _currPtr;
957-
if (index > 0x7F || tag > 0x7F || (_currPtr + 1) >= _currBuffer.length) {
957+
if (index > 0x7F || tag > 0x7F || (ptr + 1) >= _currBuffer.length) {
958958
_writeVInt(index);
959959
return;
960960
}
@@ -969,7 +969,7 @@ protected void _writeEnum(int index) throws IOException
969969
// basically, _writeVInt, but very likely to be very short; but if not:
970970
final int tag = _currField.typedTag;
971971
int ptr = _currPtr;
972-
if (index > 0x7F || tag > 0x7F || (_currPtr + 1) >= _currBuffer.length) {
972+
if (index > 0x7F || tag > 0x7F || (ptr + 1) >= _currBuffer.length) {
973973
_writeVInt(index);
974974
return;
975975
}

0 commit comments

Comments
 (0)