From 482c3e8b14e0bb5840ec19912b5d9dd55d14abd3 Mon Sep 17 00:00:00 2001 From: Artsiom Trubchyk Date: Thu, 25 Apr 2024 00:21:10 +0300 Subject: [PATCH] Update js to use `_malloc` --- liveupdate_reszip/lib/web/library_reszip.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/liveupdate_reszip/lib/web/library_reszip.js b/liveupdate_reszip/lib/web/library_reszip.js index 7fa34a1..5f60202 100644 --- a/liveupdate_reszip/lib/web/library_reszip.js +++ b/liveupdate_reszip/lib/web/library_reszip.js @@ -16,7 +16,8 @@ var LibraryResZip = { }, onload: function (response) { var ab = new Uint8Array(response); - var b = allocate(ab, "i8", ALLOC_NORMAL); + var b = _malloc(ab.length); + HEAPU8.set(ab, b); {{{ makeDynCall('viii', 'onload') }}}(context, b, ab.length); _free(b); },