[core] Fix out of range exception for string compare

This commit is contained in:
Vladimir Kondrashov
2018-08-13 11:25:33 -07:00
committed by Konstantin Käfer
parent 16e6ca86fa
commit 9ecb0997ef
3 changed files with 4 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ std::unique_ptr<AsyncRequest> AssetFileSource::request(const Resource& resource,
}
bool AssetFileSource::acceptsURL(const std::string& url) {
return std::equal(assetProtocol.begin(), assetProtocol.end(), url.begin());
return 0 == url.rfind(assetProtocol, 0);
}
} // namespace mbgl