summaryrefslogtreecommitdiff
path: root/modules/mono/mono_gd
diff options
context:
space:
mode:
authorIgnacio Roldán Etcheverry <ignalfonsore@gmail.com>2021-04-17 05:45:52 +0200
committerIgnacio Roldán Etcheverry <ignalfonsore@gmail.com>2021-04-17 05:45:52 +0200
commit27a66ee5286a82ee1bfa44033f0ce235036a5862 (patch)
tree16af9d43f1606890550c7c9320f56f142061d808 /modules/mono/mono_gd
parent49511d439124ab5a71defd22639737f45bd0ff70 (diff)
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.
Diffstat (limited to 'modules/mono/mono_gd')
-rw-r--r--modules/mono/mono_gd/gd_mono_wasm_m2n.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/mono_gd/gd_mono_wasm_m2n.h b/modules/mono/mono_gd/gd_mono_wasm_m2n.h
index 159a2ed7b6..366662ff81 100644
--- a/modules/mono/mono_gd/gd_mono_wasm_m2n.h
+++ b/modules/mono/mono_gd/gd_mono_wasm_m2n.h
@@ -176,7 +176,7 @@ T m2n_arg_cast(Mono_InterpMethodArguments *p_margs, size_t p_idx) {
} else if constexpr (cookie == 'F') {
return *reinterpret_cast<float *>(&p_margs->fargs[fidx(p_idx)]);
} else if constexpr (cookie == 'D') {
- return (T)(size_t)p_margs->fargs[p_idx];
+ return (T)p_margs->fargs[p_idx];
}
}