summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 93450805..85f0d60a 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1141,6 +1141,10 @@ void Client::initUpdatesDir()
mUpdateHost = config.getValue("updatehost", "");
}
+ // Don't go out of range int he next check
+ if (mUpdateHost.length() < 2)
+ return;
+
// Remove any trailing slash at the end of the update host
if (mUpdateHost.at(mUpdateHost.size() - 1) == '/')
mUpdateHost.resize(mUpdateHost.size() - 1);