aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/collision/Maps/MapTree.cpp2
-rw-r--r--src/server/shared/Packets/ByteBuffer.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp
index 60069b5c81f..d592d795125 100644
--- a/src/server/collision/Maps/MapTree.cpp
+++ b/src/server/collision/Maps/MapTree.cpp
@@ -157,7 +157,7 @@ namespace VMAP
{
float maxDist = (pos2 - pos1).magnitude();
// return false if distance is over max float, in case of cheater teleporting to the end of the universe
- if (maxDist == std::numeric_limits<float>::max() || !isfinite(maxDist))
+ if (maxDist == std::numeric_limits<float>::max() || !std::isfinite(maxDist))
return false;
// valid map coords should *never ever* produce float overflow, but this would produce NaNs too
diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h
index e06556423aa..9f766a72d19 100644
--- a/src/server/shared/Packets/ByteBuffer.h
+++ b/src/server/shared/Packets/ByteBuffer.h
@@ -31,6 +31,7 @@
#include <vector>
#include <cstring>
#include <time.h>
+#include <math.h>
// Root of ByteBuffer exception hierarchy
class ByteBufferException : public std::exception
@@ -241,7 +242,7 @@ class ByteBuffer
ByteBuffer &operator>>(float &value)
{
value = read<float>();
- if (!isfinite(value))
+ if (!std::isfinite(value))
throw ByteBufferException();
return *this;
}
@@ -249,7 +250,7 @@ class ByteBuffer
ByteBuffer &operator>>(double &value)
{
value = read<double>();
- if (!isfinite(value))
+ if (!std::isfinite(value))
throw ByteBufferException();
return *this;
}