diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-03-06 15:33:14 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-03-06 15:33:14 -0800 |
commit | cd83c48ed3226114c0a9f20628816966408cd9d4 (patch) | |
tree | 09a50a0c428e9b221ba12b29ea683448e26981e3 /src/mbgl/util | |
parent | de591b5d7ca365030cfd8582db488395ebcae20e (diff) | |
download | qtlocation-mapboxgl-cd83c48ed3226114c0a9f20628816966408cd9d4.tar.gz |
Insert {ratio} before extension, not inside access token
Fixes #959.
Diffstat (limited to 'src/mbgl/util')
-rw-r--r-- | src/mbgl/util/mapbox.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/util/mapbox.cpp b/src/mbgl/util/mapbox.cpp index d5b4672465..f3fded0cdd 100644 --- a/src/mbgl/util/mapbox.cpp +++ b/src/mbgl/util/mapbox.cpp @@ -53,8 +53,8 @@ std::string normalizeTileURL(const std::string& url, const std::string& sourceUR urlSansParams.pop_back(); } - std::string::size_type basenameIdx = url.rfind("/"); - std::string::size_type extensionIdx = url.rfind("."); + std::string::size_type basenameIdx = url.rfind("/", queryIdx); + std::string::size_type extensionIdx = url.rfind(".", queryIdx); if (basenameIdx == std::string::npos || extensionIdx == std::string::npos || basenameIdx > extensionIdx) { // No file extension: probably not a file name we can tack a ratio onto. |