Skip to content

Commit 198f406

Browse files
GeokureliMAJigsaw77
authored andcommitted
Bytes: Fix length from fromBytes on JS (openfl#2025)
1 parent 43f09a3 commit 198f406

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/lime/utils/Bytes.hx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ abstract Bytes(HaxeBytes) from HaxeBytes to HaxeBytes
2020
{
2121
#if js
2222
this = new HaxeBytes(bytesData);
23+
// bytesData may have extra bytes. See https://github.com/HaxeFoundation/haxe/issues/8974
24+
this.length = length;
2325
#elseif hl
2426
this = new HaxeBytes(bytesData, length);
2527
#else

0 commit comments

Comments
 (0)