encoding/ascii85.ts: encode()
returns a wrong result with a 4-byte subarray
#3223
Labels
encode()
returns a wrong result with a 4-byte subarray
#3223
Describe the bug
The
encode()
function from encoding/ascii.ts returns a wrong result with a subarray. More specifically, if a subarray is a 4-byte (or multiples of 4 bytes) slice of a buffer longer than it, and the slice refers to a non-zero offset in the buffer, the function encodes the first 4 bytes of the buffer instead of the subarray bytes.Steps to Reproduce
Expected behavior
The below test should pass, but it does not.
Environment
The text was updated successfully, but these errors were encountered: