Fix NettyDataBuffer#lastIndexOf()

This commit is contained in:
Sebastien Deleuze
2016-08-09 18:07:10 +02:00
parent 8acceba641
commit 106bda7294
2 changed files with 11 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
return -1;
}
fromIndex = Math.min(fromIndex, this.byteBuf.writerIndex() - 1);
return this.byteBuf.forEachByteDesc(0, fromIndex, predicate.negate()::test);
return this.byteBuf.forEachByteDesc(0, fromIndex + 1, predicate.negate()::test);
}
@Override