Fix #10009: bad overflow protection when taking out loans

This commit is contained in:
Rubidium
2023-01-15 11:08:08 +01:00
committed by rubidium42
parent 2355882ec1
commit 1ed0b35520
2 changed files with 7 additions and 2 deletions

View File

@@ -176,6 +176,9 @@ public:
inline constexpr bool operator <= (const int other) const { return !(*this > other); }
inline constexpr operator T () const { return this->m_value; }
static inline constexpr OverflowSafeInt<T> max() { return T_MAX; }
static inline constexpr OverflowSafeInt<T> min() { return T_MIN; }
};