Skip to content

Commit f57fd59

Browse files
committed
Fixed #34 - A bug in ByteArrayInputStream (reverse)
1 parent 4d437bd commit f57fd59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/github/shyiko/mysql/binlog/io/ByteArrayInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public BitSet readBitSet(int length, boolean bigEndian) throws IOException {
107107
}
108108

109109
private byte[] reverse(byte[] bytes) {
110-
for (int i = 0, length = bytes.length >> 2; i <= length; i++) {
110+
for (int i = 0, length = bytes.length >> 1; i < length; i++) {
111111
int j = bytes.length - 1 - i;
112112
byte t = bytes[i];
113113
bytes[i] = bytes[j];

0 commit comments

Comments
 (0)