From e35a04268fb48fac634ca123a58584a26b513831 Mon Sep 17 00:00:00 2001 From: spv420 Date: Fri, 29 Jul 2022 15:12:13 -0400 Subject: fuck --- src/js/primitives/mem.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/js/primitives') diff --git a/src/js/primitives/mem.js b/src/js/primitives/mem.js index 4025c2f..633a082 100644 --- a/src/js/primitives/mem.js +++ b/src/js/primitives/mem.js @@ -252,8 +252,10 @@ function _sptr(s) { var addy = call4arg(dlsym_addy + shc_slide, 0xfffffffe, 0x150000, 0, 0); global_sptr_addy = call4arg(addy, global_sptr_addy, sptr_size, 0, 0); } + global_sptr_addy += (16 - (global_sptr_addy % 16)); write_str(global_sptr_addy, s); global_sptr_addy += s.length; + sptr_len += (16 - (sptr_len % 16)); sptr_len += s.length; return global_sptr_addy - s.length; } @@ -281,7 +283,9 @@ function shit_heap(v) { global_sptr_addy = call4arg(addy, global_sptr_addy, sptr_size, 0, 0); } // write_str(global_sptr_addy, s); + global_sptr_addy += (16 - (global_sptr_addy % 16)); global_sptr_addy += v; + sptr_len += (16 - (sptr_len % 16)); sptr_len += v; return global_sptr_addy - v; } -- cgit v1.2.3