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