From 4c1c94baadd86802320cb1fd9b058df98a3b78ad Mon Sep 17 00:00:00 2001 From: spv420 Date: Sun, 31 Jul 2022 22:58:27 -0400 Subject: w00t --- src/stage4/lib/native_ptr.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/stage4/lib') diff --git a/src/stage4/lib/native_ptr.js b/src/stage4/lib/native_ptr.js index 39c9fef..8c11306 100644 --- a/src/stage4/lib/native_ptr.js +++ b/src/stage4/lib/native_ptr.js @@ -11,12 +11,19 @@ class native_ptr { this.size = our_proto.size; this.buf_to_obj = our_proto.buf_to_obj; this.obj_to_buf = our_proto.obj_to_buf; - return; + } else { + this.size = arguments[1]; + this.buf_to_obj = arguments[2]; + this.obj_to_buf = arguments[3]; + } + + if (this.addy === undefined) { + this.addy = shit_heap(this.size); } - this.size = arguments[1]; - this.buf_to_obj = arguments[2]; - this.obj_to_buf = arguments[3]; + if (our_proto.predef == true) { + return; + } if (this.size === undefined) { this.size = 4; -- cgit v1.2.3