From: Matt Corallo Date: Mon, 10 Jan 2022 03:07:49 +0000 (+0000) Subject: [TS] Correct pointer arithmetic on array construction X-Git-Tag: v0.0.104.1^2~17 X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=commitdiff_plain;h=c4a7eff125894d6c1bf18dec34c439f5dec4c2c5 [TS] Correct pointer arithmetic on array construction --- diff --git a/typescript_strings.py b/typescript_strings.py index a12370f4..a24faea7 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -336,8 +336,8 @@ import * as InternalUtils from '../InternalUtils.mjs' assert False # Only called if above is None def get_native_arr_ptr_call(self, ty_info): if ty_info.subty is not None: - return "(" + ty_info.subty.c_ty + "*)(", " + 4)" - return "(" + ty_info.c_ty + "*)(", " + 4)" + return "(" + ty_info.subty.c_ty + "*)(((uint8_t*)", ") + 4)" + return "(" + ty_info.c_ty + "*)(((uint8_t*)", ") + 4)" def get_native_arr_entry_call(self, ty_info, arr_name, idxc, entry_access): return None def cleanup_native_arr_ref_contents(self, arr_name, dest_name, arr_len, ty_info):