From 3e7f9124e56c8da46d9511d00ee30ee3b7092dde Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 9 May 2016 23:15:06 +0100 Subject: [PATCH] Fix gb_endian_swap32() --- gb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gb.h b/gb.h index 88207ca..bc5aa44 100644 --- a/gb.h +++ b/gb.h @@ -1,4 +1,4 @@ -/* gb.h - v0.10b - Ginger Bill's C Helper Library - public domain +/* gb.h - v0.10c - Ginger Bill's C Helper Library - public domain - no warranty implied; use at your own risk This is a single header file with a bunch of useful stuff @@ -26,6 +26,7 @@ Conventions used: Version History: + 0.10c - Fix gb_endian_swap32() 0.10b - Probable timing bug for gb_time_now() 0.10a - Work on multiple compilers 0.10 - Scratch Memory Allocator @@ -5521,7 +5522,7 @@ gb_inline u32 gb_endian_swap32(u32 i) { return (i>>24) |(i<<24) | - ((i&0x00ff0000)>>8) | ((i&0x00ff0000)<<8); + ((i&0x00ff0000)>>8) | ((i&0x0000ff00)<<8); } gb_inline u64