Apply fixes from Blue

This commit is contained in:
zontreck 2024-05-08 13:09:38 -07:00
parent c98b8d5d67
commit 2e81e5cbca
2 changed files with 8 additions and 8 deletions

View file

@ -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);
}