mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-03-14 20:05:21 +07:00
Fixed unsigned arithmetic
This commit is contained in:
parent
e831ca09cd
commit
8f0f2b36c6
@ -119,7 +119,7 @@ public abstract class Packet {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
int sequenceDiff = bb.readUnsignedByte();
|
int sequenceDiff = bb.readUnsignedByte();
|
||||||
ack = (short) (sequence - sequenceDiff);
|
ack = (sequence - sequenceDiff) & 0xFFFF;
|
||||||
} else {
|
} else {
|
||||||
if (bb.readableBytes() < 2) {
|
if (bb.readableBytes() < 2) {
|
||||||
logError("buffer too small for packet header (3)");
|
logError("buffer too small for packet header (3)");
|
||||||
|
Loading…
Reference in New Issue
Block a user