We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c46ebc5 commit 6a555b8Copy full SHA for 6a555b8
src/main/java/com/maxmind/db/MultiBuffer.java
@@ -150,7 +150,7 @@ public double getDouble() {
150
ByteBuffer buf = buffers.get(bufIndex).duplicate();
151
buf.position(off);
152
double value;
153
- if (off + 8 <= buf.remaining()) {
+ if (buf.remaining() >= 8) {
154
value = buf.getDouble();
155
position += 8;
156
return value;
@@ -169,7 +169,7 @@ public float getFloat() {
169
170
171
float value;
172
- if (off + 4 <= buf.remaining()) {
+ if (buf.remaining() >= 4) {
173
value = buf.getFloat();
174
position += 4;
175
0 commit comments