Explorar o código

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.
Ignacio Roldán Etcheverry %!s(int64=4) %!d(string=hai) anos
pai
achega
83494c30fe
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules/mono/mono_gd/gd_mono_wasm_m2n.h

+ 1 - 1
modules/mono/mono_gd/gd_mono_wasm_m2n.h

@@ -201,7 +201,7 @@ struct m2n_arg_cast_helper<T, 'F'> {
 template <typename T>
 struct m2n_arg_cast_helper<T, 'D'> {
 	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];
 	}
 };