diff --git a/crates/livesplit-auto-splitting/src/runtime/api/timer.rs b/crates/livesplit-auto-splitting/src/runtime/api/timer.rs index 1dd703fb..708c5c29 100644 --- a/crates/livesplit-auto-splitting/src/runtime/api/timer.rs +++ b/crates/livesplit-auto-splitting/src/runtime/api/timer.rs @@ -70,7 +70,13 @@ pub fn bind(linker: &mut Linker>) -> Result<(), CreationErr name: "timer_reset", })? .func_wrap("env", "timer_current_split_index", { - |caller: Caller<'_, Context>| caller.data().timer.current_split_index().map_or(-1, |i| i as i32) + |caller: Caller<'_, Context>| { + caller + .data() + .timer + .current_split_index() + .map_or(-1, |i| i as i32) + } }) .map_err(|source| CreationError::LinkFunction { source,