diff options
author | dominik <dominik@openttd.org> | 2004-08-20 11:25:36 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2004-08-20 11:25:36 +0000 |
commit | d0fe99d8a24119e0a5e0783b9f00b6a71af783ba (patch) | |
tree | 0d4b499237daf12a3f286bb746f1f4e5adcd7134 | |
parent | 146fab4188adcc5ebf112c1b4b1a756a7efb94c5 (diff) | |
download | openttd-d0fe99d8a24119e0a5e0783b9f00b6a71af783ba.tar.xz |
(svn r87) Fix: rare mousewheel scrolling with scrollbar crash
-rw-r--r-- | window.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -85,8 +85,7 @@ void DispatchRightClickEvent(Window *w, int x, int y) { void DispatchMouseWheelEvent(Window *w, int wheel) { - - if (w->vscroll.count) { + if (w->vscroll.count > w->vscroll.cap) { int pos = clamp(w->vscroll.pos + wheel, 0, w->vscroll.count - w->vscroll.cap); if (pos != w->vscroll.pos) { w->vscroll.pos = pos; |