diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-06-10 22:24:42 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-06-10 22:24:42 -0600 |
commit | 78aa59cae515ab9bf6bbe1f8ffd97990cfa1df45 (patch) | |
tree | 4cdebcade5a2005028a0539c4f7e75073b30f4a6 | |
parent | e2a893a1f129e0c59e14c8e593f5abb457170a7d (diff) | |
download | mana-78aa59cae515ab9bf6bbe1f8ffd97990cfa1df45.tar.gz mana-78aa59cae515ab9bf6bbe1f8ffd97990cfa1df45.tar.bz2 mana-78aa59cae515ab9bf6bbe1f8ffd97990cfa1df45.tar.xz mana-78aa59cae515ab9bf6bbe1f8ffd97990cfa1df45.zip |
Fix a bug with empty update hosts
-rw-r--r-- | src/client.cpp | 4 |
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); |