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;
|
final requiredCapacity = _position + additionalBytes;
|
||||||
if (requiredCapacity > _byteBuffer.length) {
|
if (requiredCapacity > _byteBuffer.length) {
|
||||||
final newCapacity =
|
final newCapacity =
|
||||||
_position * 2 + additionalBytes; // Adjust capacity as needed
|
_position + additionalBytes; // Adjust capacity as needed
|
||||||
final newBuffer = Uint8List(newCapacity);
|
final newBuffer = Uint8List(newCapacity);
|
||||||
newBuffer.setAll(0, _byteBuffer);
|
newBuffer.setAll(0, _byteBuffer);
|
||||||
_byteBuffer = newBuffer;
|
_byteBuffer = newBuffer;
|
||||||
|
@ -340,7 +340,7 @@ class ByteLayer {
|
||||||
// Lets clear the bit
|
// Lets clear the bit
|
||||||
seek(position);
|
seek(position);
|
||||||
int current = readUnsignedByte();
|
int current = readUnsignedByte();
|
||||||
current &= maskToClear;
|
current = current & ~maskToClear;
|
||||||
seek(position);
|
seek(position);
|
||||||
writeUnsignedByte(current);
|
writeUnsignedByte(current);
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,8 +112,8 @@ class UUID {
|
||||||
layer.clear();
|
layer.clear();
|
||||||
layer.writeBytes(bytes);
|
layer.writeBytes(bytes);
|
||||||
|
|
||||||
layer.unsetSetBit(6, 0x0F, 0x30);
|
layer.unsetSetBit(6, 0xF0, 0x30);
|
||||||
layer.unsetSetBit(8, 0x3F, 0x80);
|
layer.unsetSetBit(8, 0xC0, 0x80);
|
||||||
|
|
||||||
layer.resetPosition();
|
layer.resetPosition();
|
||||||
|
|
||||||
|
@ -133,8 +133,8 @@ class UUID {
|
||||||
layer.writeLong(
|
layer.writeLong(
|
||||||
(random.nextInt(0xFFFFFFFF) << 32) | random.nextInt(0xFFFFFFFF));
|
(random.nextInt(0xFFFFFFFF) << 32) | random.nextInt(0xFFFFFFFF));
|
||||||
|
|
||||||
layer.unsetSetBit(6, 0x0F, 0x40);
|
layer.unsetSetBit(6, 0xF0, 0x40);
|
||||||
layer.unsetSetBit(8, 0x3F, 0x80);
|
layer.unsetSetBit(8, 0xC0, 0x80);
|
||||||
|
|
||||||
layer.resetPosition();
|
layer.resetPosition();
|
||||||
|
|
||||||
|
@ -163,8 +163,8 @@ class UUID {
|
||||||
layer.clear();
|
layer.clear();
|
||||||
layer.writeBytes(hashBytes);
|
layer.writeBytes(hashBytes);
|
||||||
|
|
||||||
layer.unsetSetBit(6, 0x0F, 0x50);
|
layer.unsetSetBit(6, 0xF0, 0x50);
|
||||||
layer.unsetSetBit(8, 0x3F, 0x80);
|
layer.unsetSetBit(8, 0xC0, 0x80);
|
||||||
|
|
||||||
layer.resetPosition();
|
layer.resetPosition();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue