Skip to content

Commit 3d653aa

Browse files
committed
fix Ascii85 shortcut encoding handling
1 parent 17c0b2a commit 3d653aa

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Base85.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ static bool writeEncodedValue(
188188
return false;
189189
}
190190

191+
if (blockLength == stringBlockSize)
192+
{
191193
if (block == 0 && zeroShortcutChar is not null)
192194
{
193195
output[0] = zeroShortcutChar.Value; // guaranteed to be non-null
@@ -201,6 +203,7 @@ static bool writeEncodedValue(
201203
bytesWritten = 1;
202204
return true;
203205
}
206+
}
204207

205208
if (blockLength > output.Length)
206209
{

0 commit comments

Comments
 (0)