aboutsummaryrefslogtreecommitdiff
path: root/src/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/env.c')
-rw-r--r--src/env.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/env.c b/src/env.c
index fcf096a..934acac 100644
--- a/src/env.c
+++ b/src/env.c
@@ -287,10 +287,10 @@ uint32_t w2c_env_0x5FSDL_GetMouseState(struct w2c_env *env, uint32_t x,
enum pw_mouse_button button = pw_input_mouse(env->context.input, &pos);
if (x) {
- wasm_rt_memory_store32(&env->memory, x, pos.x);
+ wasm_rt_memory_store32(&env->memory, x, (int32_t)pos.x);
}
if (y) {
- wasm_rt_memory_store32(&env->memory, y, pos.y);
+ wasm_rt_memory_store32(&env->memory, y, (int32_t)pos.y);
}
return (uint32_t)button;
}