Skip to content

Commit 2ce77b2

Browse files
committed
Reduce byteArray.position if byteArray.length becomes smaller than current position
1 parent 3188058 commit 2ce77b2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

openfl/utils/ByteArray.hx

+1
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ abstract ByteArray(ByteArrayData) from ByteArrayData to ByteArrayData {
242242
if (value > 0) {
243243

244244
this.__resize (value);
245+
if (value < this.position) this.position = value;
245246

246247
}
247248

0 commit comments

Comments
 (0)