(svn r12572) -Fix (r12192): min() has 32bit arguments, clamping of 64bit values didn't work

This commit is contained in:
smatz 2008-04-04 20:03:49 +00:00
parent 1db6c4d55e
commit 6a501c85fc

View File

@ -177,7 +177,7 @@ static inline int32 ClampToI32(const int64 a)
*/ */
static inline uint16 ClampToU16(const uint64 a) static inline uint16 ClampToU16(const uint64 a)
{ {
return min(a, 0xFFFF); return (uint16)(a <= 0xFFFFU ? a : 0xFFFFU);
} }
/** /**