Fixed infinite loop in isfinite function with GCC #221

This commit is contained in:
Christophe Riccio
2014-08-04 01:00:49 +02:00
parent d84fa89cb8
commit 96ef6ae9ba
2 changed files with 4 additions and 1 deletions

View File

@@ -7,6 +7,8 @@
// File : glm/gtx/compatibility.inl
///////////////////////////////////////////////////////////////////////////////////////////////////
#include <limits>
namespace glm
{
// isfinite
@@ -21,7 +23,7 @@ namespace glm
# elif(GLM_COMPILER & GLM_COMPILER_GCC && GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isfinite(x) != 0;
# else
return isfinite(x) != 0;
return x >= std::numeric_limits<genType>::min() && x <= std::numeric_limits<genType>::max();
# endif
}