From 78aa59cae515ab9bf6bbe1f8ffd97990cfa1df45 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 10 Jun 2010 22:24:42 -0600 Subject: Fix a bug with empty update hosts --- src/client.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3-70-g09d2