diff --git a/core/src/main/java/com/boydti/fawe/object/clipboard/DiskOptimizedClipboard.java b/core/src/main/java/com/boydti/fawe/object/clipboard/DiskOptimizedClipboard.java index 47a6a995..e4fbdfb8 100644 --- a/core/src/main/java/com/boydti/fawe/object/clipboard/DiskOptimizedClipboard.java +++ b/core/src/main/java/com/boydti/fawe/object/clipboard/DiskOptimizedClipboard.java @@ -521,9 +521,8 @@ public class DiskOptimizedClipboard extends FaweClipboard implements Closeable { int index = (HEADER_SIZE) + (i << 1); // 00000000 00000000 // [ id ]data - byte id2 = mbb.get(index + 1); - mbb.put(index, (byte) (id >> 4)); - mbb.put(index + 1, (byte) (((id & 0xFF) << 4) + (id2 & 0xFF))); + char combined = mbb.getChar(index); + mbb.putChar(index, (char) ((combined & 0xF00F) + (id << 4))); } public void setCombined(int i, int combined) { @@ -536,7 +535,7 @@ public class DiskOptimizedClipboard extends FaweClipboard implements Closeable { // 00000000 00000000 // [ id ]data char combined = mbb.getChar(index); - mbb.putChar(index, (char) ((combined & 0xFFFF) + (add << 12))); + mbb.putChar(index, (char) ((combined & 0x0FFF) + (add << 12))); } @Override