mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Fix packed data reading in anti-xray
This commit is contained in:
parent
2bdad1f69a
commit
002d3ab1b5
1 changed files with 54 additions and 0 deletions
54
Spigot-Server-Patches/fixup-Anti-Xray.patch
Normal file
54
Spigot-Server-Patches/fixup-Anti-Xray.patch
Normal file
|
@ -0,0 +1,54 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Fri, 26 Jun 2020 14:10:10 -0700
|
||||
Subject: [PATCH] fixup! Anti-Xray
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
||||
@@ -0,0 +0,0 @@ public final class DataBitsReader {
|
||||
bitInLongIndex += bitsPerObject;
|
||||
|
||||
if (bitInLongIndex > 63) {
|
||||
- bitInLongIndex -= 64;
|
||||
+ bitInLongIndex = 0;
|
||||
longInDataBitsIndex += 8;
|
||||
init();
|
||||
-
|
||||
- if (bitInLongIndex > 0) {
|
||||
- value |= current << bitsPerObject - bitInLongIndex & mask;
|
||||
- }
|
||||
}
|
||||
|
||||
return value;
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
||||
@@ -0,0 +0,0 @@ public final class DataBitsWriter {
|
||||
|
||||
if (bitInLongIndex > 63) {
|
||||
finish();
|
||||
- bitInLongIndex -= 64;
|
||||
+ bitInLongIndex = 0;
|
||||
longInDataBitsIndex += 8;
|
||||
init();
|
||||
-
|
||||
- if (bitInLongIndex > 0) {
|
||||
- current = current & ~(mask >>> bitsPerObject - bitInLongIndex) | (value & mask) >>> bitsPerObject - bitInLongIndex;
|
||||
- dirty = true;
|
||||
- }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public final class DataBitsWriter {
|
||||
|
||||
if (bitInLongIndex > 63) {
|
||||
finish();
|
||||
- bitInLongIndex -= 64;
|
||||
+ bitInLongIndex = 0;
|
||||
longInDataBitsIndex += 8;
|
||||
init();
|
||||
}
|
Loading…
Reference in a new issue