From 8702dce4d646ca80e50c33e9e190b210a77cac14 Mon Sep 17 00:00:00 2001 From: r-lyeh Date: Sat, 13 Jun 2015 13:50:31 +0200 Subject: [PATCH] msvc 64-bit fixes --- stb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stb.h b/stb.h index 671ffcd..241e721 100644 --- a/stb.h +++ b/stb.h @@ -1023,7 +1023,7 @@ void stb_fatal(char *s, ...) fputs("\n", stderr); #ifdef _WIN32 #ifdef STB_DEBUG - __asm int 3; // trap to debugger! + __debugbreak; // trap to debugger! #endif #endif exit(1); @@ -1401,7 +1401,7 @@ int stb_is_pow2(unsigned int n) int stb_log2_floor(unsigned int n) { #if _MSC_VER > 1700 - DWORD i; + unsigned int i; _BitScanReverse(&i, n); return i != 0 ? i : -1; #else @@ -7359,7 +7359,7 @@ typedef struct #define GetBucket(p) ((stb_ps_bucket *) ((char *) (p) - STB_ps_bucket)) #define EncodeBucket(p) ((stb_ps *) ((char *) (p) + STB_ps_bucket)) -typedef char stb__verify_bucket_heap_size[sizeof(stb_ps_bucket) == 16]; +typedef char stb__verify_bucket_heap_size[sizeof(stb_ps_bucket) >= 16]; static void stb_bucket_free(stb_ps_bucket *b) {