summaryrefslogtreecommitdiff
path: root/src/mbgl/util
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-03-06 15:33:14 -0800
committerMinh Nguyễn <mxn@1ec5.org>2015-03-06 15:33:14 -0800
commitcd83c48ed3226114c0a9f20628816966408cd9d4 (patch)
tree09a50a0c428e9b221ba12b29ea683448e26981e3 /src/mbgl/util
parentde591b5d7ca365030cfd8582db488395ebcae20e (diff)
downloadqtlocation-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.cpp4
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.