geforkt von Mirrors/Paper
Fix Anti-Xray
Dieser Commit ist enthalten in:
Ursprung
2bdad1f69a
Commit
8088a42029
@ -891,19 +891,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public int read() {
|
+ public int read() {
|
||||||
+ int value = (int) (current >>> bitInLongIndex) & mask;
|
+ if (bitInLongIndex + bitsPerObject > 64) {
|
||||||
+ bitInLongIndex += bitsPerObject;
|
+ bitInLongIndex = 0;
|
||||||
+
|
|
||||||
+ if (bitInLongIndex > 63) {
|
|
||||||
+ bitInLongIndex -= 64;
|
|
||||||
+ longInDataBitsIndex += 8;
|
+ longInDataBitsIndex += 8;
|
||||||
+ init();
|
+ init();
|
||||||
+
|
|
||||||
+ if (bitInLongIndex > 0) {
|
|
||||||
+ value |= current << bitsPerObject - bitInLongIndex & mask;
|
|
||||||
+ }
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ int value = (int) (current >>> bitInLongIndex) & mask;
|
||||||
|
+ bitInLongIndex += bitsPerObject;
|
||||||
+ return value;
|
+ return value;
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
@ -969,29 +964,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void write(int value) {
|
+ public void write(int value) {
|
||||||
|
+ if (bitInLongIndex + bitsPerObject > 64) {
|
||||||
|
+ finish();
|
||||||
|
+ bitInLongIndex = 0;
|
||||||
|
+ longInDataBitsIndex += 8;
|
||||||
|
+ init();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ current = current & ~(mask << bitInLongIndex) | (value & mask) << bitInLongIndex;
|
+ current = current & ~(mask << bitInLongIndex) | (value & mask) << bitInLongIndex;
|
||||||
+ dirty = true;
|
+ dirty = true;
|
||||||
+ bitInLongIndex += bitsPerObject;
|
+ bitInLongIndex += bitsPerObject;
|
||||||
+
|
|
||||||
+ if (bitInLongIndex > 63) {
|
|
||||||
+ finish();
|
|
||||||
+ bitInLongIndex -= 64;
|
|
||||||
+ longInDataBitsIndex += 8;
|
|
||||||
+ init();
|
|
||||||
+
|
|
||||||
+ if (bitInLongIndex > 0) {
|
|
||||||
+ current = current & ~(mask >>> bitsPerObject - bitInLongIndex) | (value & mask) >>> bitsPerObject - bitInLongIndex;
|
|
||||||
+ dirty = true;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void skip() {
|
+ public void skip() {
|
||||||
+ bitInLongIndex += bitsPerObject;
|
+ bitInLongIndex += bitsPerObject;
|
||||||
+
|
+
|
||||||
+ if (bitInLongIndex > 63) {
|
+ if (bitInLongIndex > 64) {
|
||||||
+ finish();
|
+ finish();
|
||||||
+ bitInLongIndex -= 64;
|
+ bitInLongIndex = bitsPerObject;
|
||||||
+ longInDataBitsIndex += 8;
|
+ longInDataBitsIndex += 8;
|
||||||
+ init();
|
+ init();
|
||||||
+ }
|
+ }
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren