summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-03 09:07:14 +0000
committerrubidium <rubidium@openttd.org>2009-09-03 09:07:14 +0000
commitd81a3ba2da1f0677228c295c2ad1a3da386bdda0 (patch)
tree9c67dc8ad525aeec69f2e3928ca6f750e7c2b214 /src
parent5fd5ae125a4de148daeb1277a32a79cf7e8875b0 (diff)
downloadopenttd-d81a3ba2da1f0677228c295c2ad1a3da386bdda0.tar.xz
(svn r17399) -Fix (r17365): if scrollbar has more capacity than elements clicking on the "scroll down" button asserted (esminis)
Diffstat (limited to 'src')
-rw-r--r--src/window_gui.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/window_gui.h b/src/window_gui.h
index 4a4750b43..80819a9d3 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -287,7 +287,7 @@ public:
void UpdatePosition(int difference)
{
if (difference == 0) return;
- this->SetPosition(Clamp(this->pos + difference, 0, this->count - this->cap));
+ this->SetPosition(Clamp(this->pos + difference, 0, max(this->count - this->cap, 0)));
}
/**