Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/coding
diff options
context:
space:
mode:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2017-04-04 13:57:31 +0300
committerVladiMihaylenko <vxmihaylenko@gmail.com>2017-04-05 13:32:13 +0300
commitd3256769d6ca546d3a5f083861942056a9f5d1d1 (patch)
tree01f1c904a01cfce9ccd1aa36121e75ab5c44d179 /coding
parente9b446ff4302980a35b2df6026cf615fe8386589 (diff)
[map] Parse search request.
Diffstat (limited to 'coding')
-rw-r--r--coding/uri.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/coding/uri.cpp b/coding/uri.cpp
index 4b98a96839..4894e7df9f 100644
--- a/coding/uri.cpp
+++ b/coding/uri.cpp
@@ -51,7 +51,13 @@ bool Uri::ForEachKeyValue(TCallback const & callback) const
{
// parse query for keys and values
size_t const count = m_url.size();
- for (size_t start = m_queryStart; start < count; )
+ size_t const queryStart = m_queryStart;
+
+ // Just a URL without parametrs.
+ if (queryStart == count)
+ return false;
+
+ for (size_t start = queryStart; start < count; )
{
size_t end = m_url.find('&', start);
if (end == string::npos)