summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2014-07-12 17:04:14 +0000
committeralberth <alberth@openttd.org>2014-07-12 17:04:14 +0000
commit8fe8765aaa93e0c992305a7a9c4b21dd9c1842c7 (patch)
treedd7dcc52320f1a73f9fcb2af909e51fa6c1b36fb /src/core
parent98194e7b6a2ad0615b8c68fa368e246f470ea09d (diff)
downloadopenttd-8fe8765aaa93e0c992305a7a9c4b21dd9c1842c7.tar.xz
(svn r26685) -Fix: Tighten parameter bound checks on GSCargoMonitor functions, and return -1 on out-of-bound parameters.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/overflowsafe_type.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/overflowsafe_type.hpp b/src/core/overflowsafe_type.hpp
index 42ec98bd0..edc25d275 100644
--- a/src/core/overflowsafe_type.hpp
+++ b/src/core/overflowsafe_type.hpp
@@ -152,5 +152,6 @@ template <class T, int64 T_MAX, int64 T_MIN> inline OverflowSafeInt<T, T_MAX, T_
template <class T, int64 T_MAX, int64 T_MIN> inline OverflowSafeInt<T, T_MAX, T_MIN> operator / (byte a, OverflowSafeInt<T, T_MAX, T_MIN> b) { return (OverflowSafeInt<T, T_MAX, T_MIN>)a / (int)b; }
typedef OverflowSafeInt<int64, INT64_MAX, INT64_MIN> OverflowSafeInt64;
+typedef OverflowSafeInt<int32, INT32_MAX, INT32_MIN> OverflowSafeInt32;
#endif /* OVERFLOWSAFE_TYPE_HPP */