Skip to content

Commit

Permalink
#322 use a new array for 'bytes'
Browse files Browse the repository at this point in the history
because a subarray can't be transferred to the decode worker
  • Loading branch information
totaam committed Sep 24, 2024
1 parent 194cbbf commit 105ba6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html5/js/lib/rencode.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ function rdecode_string(dec) {
const bytes = dec.buf.subarray(dec.pos, dec.pos+str_len);
dec.pos += str_len;
if (binary) {
return bytes;
return new Uint8Array(bytes);
}
if (str_len==0) {
return "";
Expand Down

0 comments on commit 105ba6a

Please sign in to comment.