diff --git a/crates/haku-wasm/src/lib.rs b/crates/haku-wasm/src/lib.rs index 0e21b02..33cbec9 100644 --- a/crates/haku-wasm/src/lib.rs +++ b/crates/haku-wasm/src/lib.rs @@ -496,22 +496,24 @@ unsafe extern "C" fn haku_num_diagnostics(instance: *const Instance) -> u32 { #[unsafe(no_mangle)] unsafe extern "C" fn haku_diagnostic_start(instance: *const Instance, index: u32) -> u32 { - (*instance).diagnostics2[index as usize].span().start + (&(*instance).diagnostics2)[index as usize].span().start } #[unsafe(no_mangle)] unsafe extern "C" fn haku_diagnostic_end(instance: *const Instance, index: u32) -> u32 { - (*instance).diagnostics2[index as usize].span().end + (&(*instance).diagnostics2)[index as usize].span().end } #[unsafe(no_mangle)] unsafe extern "C" fn haku_diagnostic_message(instance: *const Instance, index: u32) -> *const u8 { - (*instance).diagnostics2[index as usize].message().as_ptr() + (&(*instance).diagnostics2)[index as usize] + .message() + .as_ptr() } #[unsafe(no_mangle)] unsafe extern "C" fn haku_diagnostic_message_len(instance: *const Instance, index: u32) -> u32 { - (*instance).diagnostics2[index as usize].message().len() as u32 + (&(*instance).diagnostics2)[index as usize].message().len() as u32 } #[unsafe(no_mangle)]