aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/Movement/Spline/Spline.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h
index 42090cae71b..d4b100ee46e 100644
--- a/src/server/game/Movement/Spline/Spline.h
+++ b/src/server/game/Movement/Spline/Spline.h
@@ -21,6 +21,7 @@
#include "MovementTypedefs.h"
#include <G3D/Vector3.h>
+#include <limits>
namespace Movement {
@@ -184,6 +185,9 @@ public:
while (i < index_hi)
{
new_length = cacher(*this, i);
+ // length overflowed, assign to max positive value
+ if (new_length < 0)
+ new_length = std::numeric_limits<length_type>::max();
lengths[++i] = new_length;
ASSERT(prev_length <= new_length);