From 83494c30feed53552e1cd599bb7c2265af252826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacio=20Rold=C3=A1n=20Etcheverry?= Date: Sat, 17 Apr 2021 05:23:47 +0200 Subject: [PATCH] C#: Fix `double` casting in wasm m2n trampolines The trampolines were casting double to `size_t` (likely a copy-paste mistake), so the value was getting truncated. --- modules/mono/mono_gd/gd_mono_wasm_m2n.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mono/mono_gd/gd_mono_wasm_m2n.h b/modules/mono/mono_gd/gd_mono_wasm_m2n.h index 455d46309d6..e0ad4c5e9b6 100644 --- a/modules/mono/mono_gd/gd_mono_wasm_m2n.h +++ b/modules/mono/mono_gd/gd_mono_wasm_m2n.h @@ -201,7 +201,7 @@ struct m2n_arg_cast_helper { template struct m2n_arg_cast_helper { static T cast(Mono_InterpMethodArguments *p_margs, size_t p_idx) { - return (T)(size_t)p_margs->fargs[p_idx]; + return (T)p_margs->fargs[p_idx]; } };