From 3d5ef2bcf5bd0d213a6eca0fa9fd9f6d11c26b2d Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 19 Oct 2024 21:39:56 +0200 Subject: [PATCH] Fix inverted condition in panic handler Fixes 139d204c (Restore terminal state again in panic handler, 2024-10-12). --- src/panic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panic.rs b/src/panic.rs index cd0bdf3a5..4ee4bf4dd 100644 --- a/src/panic.rs +++ b/src/panic.rs @@ -34,7 +34,7 @@ pub fn panic_handler(main: impl FnOnce() -> i32 + UnwindSafe) -> ! { "%s crashed, please report a bug.", PROGRAM_NAME.get().unwrap(), ); - if is_main_thread() { + if !is_main_thread() { eprintf!("\n"); std::thread::sleep(Duration::from_secs(1)); } else {