Skip to content
Snippets Groups Projects
Commit 3285184c authored by Mark Karpilovskij's avatar Mark Karpilovskij Committed by Daniel Salzman
Browse files

geoip: fix finding for the best view

parent c0c262f9
No related branches found
No related tags found
No related merge requests found
Pipeline #48124 passed
......@@ -673,7 +673,8 @@ static geo_view_t *find_best_view(geo_view_t *dummy, geo_trie_val_t *data, geoip
if (idx == -1) { // There is no suitable view.
return NULL;
}
if (cmp(dummy, &data->views[idx]) != 0) {
if (cmp(dummy, &data->views[idx]) != 0 &&
!view_strictly_in_view(dummy, &data->views[idx], ctx->mode)) {
idx = data->views[idx].prev;
while (!view_strictly_in_view(dummy, &data->views[idx], ctx->mode)) {
if (idx == data->views[idx].prev) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment