diff --git a/lime/utils/ByteArray.hx b/lime/utils/ByteArray.hx index be9b83aa2..83e0fd3d9 100644 --- a/lime/utils/ByteArray.hx +++ b/lime/utils/ByteArray.hx @@ -80,7 +80,9 @@ class ByteArray #if !js extends Bytes #end implements ArrayAccess #if !js i public function new (size = 0):Void { #if js + if (size > 0) allocated = size; ___resizeBuffer (allocated); + length = allocated; #else length = 0; if (size > 0) {