From b639b6a4680fef7595af4c639fcc1bfa91624bf8 Mon Sep 17 00:00:00 2001 From: Robert Nix Date: Tue, 9 Jun 2015 12:44:50 -0500 Subject: [PATCH] Don't use __asm int 3; on 64-bit platforms --- stb.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stb.h b/stb.h index d78c465..03d891e 100644 --- a/stb.h +++ b/stb.h @@ -1021,9 +1021,15 @@ void stb_fatal(char *s, ...) vfprintf(stderr, s, a); va_end(a); fputs("\n", stderr); - #ifdef _WIN32 #ifdef STB_DEBUG + #ifdef _MSC_VER + #ifndef STB_PTR64 __asm int 3; // trap to debugger! + #else + __debugbreak(); + #endif + #else + __builtin_trap(); #endif #endif exit(1);