summaryrefslogtreecommitdiff
path: root/src/js/primitives
diff options
context:
space:
mode:
authorspv420 <spv@spv.sh>2022-07-29 15:12:13 -0400
committerspv420 <spv@spv.sh>2022-07-29 15:12:13 -0400
commite35a04268fb48fac634ca123a58584a26b513831 (patch)
tree0061367f10cddc99081868e16d9d4bcb56861aff /src/js/primitives
parentaaeed83399c45daa3f067abc5fb1cc4abfb57f5b (diff)
fuck
Diffstat (limited to 'src/js/primitives')
-rw-r--r--src/js/primitives/mem.js4
1 files changed, 4 insertions, 0 deletions
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;
}