[core] Fix out of range exception for string compare
This commit is contained in:
committed by
Konstantin Käfer
parent
16e6ca86fa
commit
9ecb0997ef
@@ -75,7 +75,7 @@ std::unique_ptr<AsyncRequest> LocalFileSource::request(const Resource& resource,
|
||||
}
|
||||
|
||||
bool LocalFileSource::acceptsURL(const std::string& url) {
|
||||
return std::equal(fileProtocol.begin(), fileProtocol.end(), url.begin());
|
||||
return 0 == url.rfind(fileProtocol, 0);
|
||||
}
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user