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.
This commit is contained in:
Ignacio Roldán Etcheverry 2021-04-17 05:45:52 +02:00
parent 49511d4391
commit 27a66ee528
1 changed files with 1 additions and 1 deletions

View File

@ -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];
}
}