Fix ByteArray initial size on HTML5
This commit is contained in:
@@ -80,7 +80,9 @@ class ByteArray #if !js extends Bytes #end implements ArrayAccess<Int> #if !js i
|
|||||||
public function new (size = 0):Void {
|
public function new (size = 0):Void {
|
||||||
|
|
||||||
#if js
|
#if js
|
||||||
|
if (size > 0) allocated = size;
|
||||||
___resizeBuffer (allocated);
|
___resizeBuffer (allocated);
|
||||||
|
length = allocated;
|
||||||
#else
|
#else
|
||||||
length = 0;
|
length = 0;
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user