Finish fixing AddBlock support

This commit is contained in:
Mike Primm 2017-08-01 21:36:01 -05:00
parent 8c519afce6
commit 2411adb6d1

View File

@ -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