medfall

A super great game engine
Log | Files | Refs

commit 78c5a1f40a1924dc950a82bc22fe87aa5ebb5d36
parent 353e1b5dc2a4f9c6a4d29285d376bc030ffd2349
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue May 16 19:55:07 +0300

Fix sign extension issue in fnv1a

Diffstat:
stringhash.h | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stringhash.h b/stringhash.h @@ -3,7 +3,7 @@ #include "intrinsics.h" constexpr static inline u32 fnv1a( const char * str, size_t n ) { - return n == 0 ? 0x811C9DC5 : ( fnv1a( str + 1, n - 1 ) ^ u32( str[ 0 ] ) ) * 0x01000193; + return n == 0 ? 0x811C9DC5 : ( fnv1a( str + 1, n - 1 ) ^ u32( u8( str[ 0 ] ) ) ) * 0x01000193; } template< size_t N >