Skip to content

Commit 89548fe

Browse files
committed
Fix build error
1 parent 31fa1ea commit 89548fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ImageSharp/Formats/Tiff/Compression/Decompressors/T6TiffCompression.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ private uint WriteScanLine(Span<byte> buffer, Span<byte> scanLine, uint bitsWrit
8787
uint remainder = bitsWritten % 8;
8888
if (remainder != 0)
8989
{
90-
BitWriterUtils.WriteBits(buffer, (int)bitsWritten, pad, 0);
91-
bitsWritten += pad;
90+
uint padding = 8 - remainder;
91+
BitWriterUtils.WriteBits(buffer, (int)bitsWritten, padding, 0);
92+
bitsWritten += padding;
9293
}
9394

9495
return bitsWritten;

0 commit comments

Comments
 (0)