geforkt von Mirrors/Velocity
fix bug
Dieser Commit ist enthalten in:
Ursprung
e6a93ad0c6
Commit
5303239f66
@ -51,7 +51,10 @@ public class MinecraftVarintFrameDecoder extends ByteToMessageDecoder {
|
||||
return;
|
||||
}
|
||||
|
||||
if (reader.getResult() == DecodeResult.SUCCESS) {
|
||||
if (reader.getResult() == DecodeResult.RUN_OF_ZEROES) {
|
||||
// this will return to the point where the next varint starts
|
||||
in.readerIndex(varintEnd);
|
||||
} else if (reader.getResult() == DecodeResult.SUCCESS) {
|
||||
int readVarint = reader.getReadVarint();
|
||||
int bytesRead = reader.getBytesRead();
|
||||
if (readVarint < 0) {
|
||||
|
@ -33,7 +33,6 @@ class VarintByteDecoder implements ByteProcessor {
|
||||
return true;
|
||||
}
|
||||
if (result == DecodeResult.RUN_OF_ZEROES) {
|
||||
result = DecodeResult.SUCCESS;
|
||||
return false;
|
||||
}
|
||||
readVarint |= (k & 0x7F) << bytesRead++ * 7;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren