summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 007901341..380bf9060 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -629,7 +629,7 @@ public:
case WKC_PAGEDOWN:
/* scroll down a page */
if (this->server == NULL) return ES_HANDLED;
- this->list_pos = (this->list_pos + this->vscroll.cap > this->servers.Length() - 1) ? this->servers.Length() - 1 : this->list_pos + this->vscroll.cap;
+ this->list_pos = min(this->list_pos + this->vscroll.cap, (int)this->servers.Length() - 1);
break;
case WKC_HOME:
/* jump to beginning */