summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index cdda89585..89fa1dc4e 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2158,9 +2158,10 @@ void Client::initUpdatesDir()
if (mUpdateHost.length() < 2)
return;
+ const int sz = mUpdateHost.size();
// Remove any trailing slash at the end of the update host
- if (mUpdateHost.at(mUpdateHost.size() - 1) == '/')
- mUpdateHost.resize(mUpdateHost.size() - 1);
+ if (mUpdateHost.at(sz - 1) == '/')
+ mUpdateHost.resize(sz - 1);
// Parse out any "http://" or "https://", and set the updates directory
const size_t pos = mUpdateHost.find("://");