From a1e822df6b36c07236657c17fa29f017e7b2f8ef Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 23 Apr 2009 23:29:44 +0000 Subject: (svn r16130) -Fix [FS#2855]: the overflowsafe type didn't like dividing by int64 larger than MAX_INT32 causing division by negative numbers and small anomolies when drawing graphs. --- src/core/overflowsafe_type.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/overflowsafe_type.hpp b/src/core/overflowsafe_type.hpp index 882363f1b..26e36110f 100644 --- a/src/core/overflowsafe_type.hpp +++ b/src/core/overflowsafe_type.hpp @@ -86,7 +86,7 @@ public: FORCEINLINE OverflowSafeInt operator * (const byte factor) const { OverflowSafeInt result = *this; result *= (int64)factor; return result; } /* Operators for division */ - FORCEINLINE OverflowSafeInt& operator /= (const int divisor) { this->m_value /= divisor; return *this; } + FORCEINLINE OverflowSafeInt& operator /= (const int64 divisor) { this->m_value /= divisor; return *this; } FORCEINLINE OverflowSafeInt operator / (const OverflowSafeInt& divisor) const { OverflowSafeInt result = *this; result /= divisor.m_value; return result; } FORCEINLINE OverflowSafeInt operator / (const int divisor) const { OverflowSafeInt result = *this; result /= divisor; return result; } FORCEINLINE OverflowSafeInt operator / (const uint divisor) const { OverflowSafeInt result = *this; result /= (int)divisor; return result; } -- cgit v1.2.3-70-g09d2