Apply fixes from Blue
This commit is contained in:
parent
c98b8d5d67
commit
2e81e5cbca
2 changed files with 8 additions and 8 deletions
|
@ -21,7 +21,7 @@ class ByteLayer {
|
|||
final requiredCapacity = _position + additionalBytes;
|
||||
if (requiredCapacity > _byteBuffer.length) {
|
||||
final newCapacity =
|
||||
_position * 2 + additionalBytes; // Adjust capacity as needed
|
||||
_position + additionalBytes; // Adjust capacity as needed
|
||||
final newBuffer = Uint8List(newCapacity);
|
||||
newBuffer.setAll(0, _byteBuffer);
|
||||
_byteBuffer = newBuffer;
|
||||
|
@ -340,7 +340,7 @@ class ByteLayer {
|
|||
// Lets clear the bit
|
||||
seek(position);
|
||||
int current = readUnsignedByte();
|
||||
current &= maskToClear;
|
||||
current = current & ~maskToClear;
|
||||
seek(position);
|
||||
writeUnsignedByte(current);
|
||||
}
|
||||
|
|
|
@ -112,8 +112,8 @@ class UUID {
|
|||
layer.clear();
|
||||
layer.writeBytes(bytes);
|
||||
|
||||
layer.unsetSetBit(6, 0x0F, 0x30);
|
||||
layer.unsetSetBit(8, 0x3F, 0x80);
|
||||
layer.unsetSetBit(6, 0xF0, 0x30);
|
||||
layer.unsetSetBit(8, 0xC0, 0x80);
|
||||
|
||||
layer.resetPosition();
|
||||
|
||||
|
@ -133,8 +133,8 @@ class UUID {
|
|||
layer.writeLong(
|
||||
(random.nextInt(0xFFFFFFFF) << 32) | random.nextInt(0xFFFFFFFF));
|
||||
|
||||
layer.unsetSetBit(6, 0x0F, 0x40);
|
||||
layer.unsetSetBit(8, 0x3F, 0x80);
|
||||
layer.unsetSetBit(6, 0xF0, 0x40);
|
||||
layer.unsetSetBit(8, 0xC0, 0x80);
|
||||
|
||||
layer.resetPosition();
|
||||
|
||||
|
@ -163,8 +163,8 @@ class UUID {
|
|||
layer.clear();
|
||||
layer.writeBytes(hashBytes);
|
||||
|
||||
layer.unsetSetBit(6, 0x0F, 0x50);
|
||||
layer.unsetSetBit(8, 0x3F, 0x80);
|
||||
layer.unsetSetBit(6, 0xF0, 0x50);
|
||||
layer.unsetSetBit(8, 0xC0, 0x80);
|
||||
|
||||
layer.resetPosition();
|
||||
|
||||
|
|
Loading…
Reference in a new issue