summaryrefslogtreecommitdiff
path: root/src/graph_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-25 22:32:32 +0000
committerrubidium <rubidium@openttd.org>2013-11-25 22:32:32 +0000
commit04e97a0bec525975ec4594a2abf542964a1e0d25 (patch)
tree2e44d9af6d9818dbe7a545dd19263b7655ae16ab /src/graph_gui.cpp
parent77e5b1e3b26320e7d66a3835424c95fcb77e43bb (diff)
downloadopenttd-04e97a0bec525975ec4594a2abf542964a1e0d25.tar.xz
(svn r26116) -Codechange: validate that the number of lines in a graph is more than 0
Diffstat (limited to 'src/graph_gui.cpp')
-rw-r--r--src/graph_gui.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index f63c57127..10779502d 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -200,6 +200,8 @@ protected:
*/
ValuesInterval GetValuesInterval(int num_hori_lines) const
{
+ assert(num_hori_lines > 0);
+
ValuesInterval current_interval;
current_interval.highest = INT64_MIN;
current_interval.lowest = INT64_MAX;