[quake3-commits] r2002 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue May 31 21:50:19 EDT 2011


Author: thilo
Date: 2011-05-31 21:50:19 -0400 (Tue, 31 May 2011)
New Revision: 2002

Modified:
   trunk/code/qcommon/vm_x86_64_assembler.c
Log:
Fix is*() functions for windows where long value is 4 bytes


Modified: trunk/code/qcommon/vm_x86_64_assembler.c
===================================================================
--- trunk/code/qcommon/vm_x86_64_assembler.c	2011-05-31 20:47:18 UTC (rev 2001)
+++ trunk/code/qcommon/vm_x86_64_assembler.c	2011-06-01 01:50:19 UTC (rev 2002)
@@ -343,32 +343,32 @@
 
 static inline int iss8(int64_t v)
 {
-	return (v >= -0x80 && v <= 0x7f);
+	return (SCHAR_MIN <= v && v <= SCHAR_MAX);
 }
 
 static inline int isu8(u64 v)
 {
-	return (v <= 0xff);
+	return (v <= UCHAR_MAX);
 }
 
 static inline int iss16(int64_t v)
 {
-	return (v >= -0x8000 && v <= 0x7fff);
+	return (SHRT_MIN <= v && v <= SHRT_MAX);
 }
 
 static inline int isu16(u64 v)
 {
-	return (v <= 0xffff);
+	return (v <= USHRT_MAX);
 }
 
 static inline int iss32(int64_t v)
 {
-	return (v >= -0x80000000L && v <= 0x7fffffff);
+	return (INT_MIN <= v && v <= INT_MAX);
 }
 
 static inline int isu32(u64 v)
 {
-	return (v <= 0xffffffff);
+	return (v <= UINT_MAX);
 }
 
 static void emit_opsingle(const char* mnemonic, arg_t arg1, arg_t arg2, void* data)



More information about the quake3-commits mailing list