From 7bc84e1ff3d538e34068a2e248559bdaa1708471 Mon Sep 17 00:00:00 2001 From: SomeGuyWhoLovesCoding <99929173+SomeGuyWhoLovesCoding@users.noreply.github.com> Date: Tue, 10 Sep 2024 11:45:37 -0400 Subject: [PATCH] Update Bytes.hx --- std/hl/_std/haxe/io/Bytes.hx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/std/hl/_std/haxe/io/Bytes.hx b/std/hl/_std/haxe/io/Bytes.hx index ccae5d8309d..5e79a4a04ae 100644 --- a/std/hl/_std/haxe/io/Bytes.hx +++ b/std/hl/_std/haxe/io/Bytes.hx @@ -203,12 +203,13 @@ class Bytes { return s.toString(); } - public inline function getData():BytesData { + public function getData():BytesData { return new haxe.io.BytesData(b, length); } - public inline static function alloc(length:Int):Bytes { + public static function alloc(length:Int):Bytes { var b = new hl.Bytes(length); + b.fill(0, length, 0); return new Bytes(b, length); }