diff --git a/ctru-sys/src/sys/libc.rs b/ctru-sys/src/sys/libc.rs index 95e37db..b4d4a12 100644 --- a/ctru-sys/src/sys/libc.rs +++ b/ctru-sys/src/sys/libc.rs @@ -7,5 +7,6 @@ pub enum c_void { } extern "C" { + pub fn abort() -> !; pub fn write(fd: i32, buf: *const c_void, count: usize) -> isize; } diff --git a/src/lib.rs b/src/lib.rs index 43d72a7..ca5c249 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,5 +20,5 @@ pub use sdmc::Sdmc; extern "C" fn eh_personality() {} #[lang = "panic_fmt"] fn panic_fmt() -> ! { - loop {} + unsafe { libctru::libc::abort() } }