From 7785af5346db27ba75c6fedad490cb1f1d52fa84 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Wed, 13 May 2020 08:23:30 -0700 Subject: [PATCH] Fix incorrect indexing into fdw list --- ogr_fdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogr_fdw.c b/ogr_fdw.c index 5a576c0..a66205f 100644 --- a/ogr_fdw.c +++ b/ogr_fdw.c @@ -969,7 +969,7 @@ ogrSpatialFilterFromList(const List* lst) spatial_filter->minx = floatVal(lsecond(lst)); spatial_filter->miny = floatVal(lthird(lst)); spatial_filter->maxx = floatVal(lfourth(lst)); - spatial_filter->maxy = floatVal(list_nth(lst, 5)); + spatial_filter->maxy = floatVal(list_nth(lst, 4)); /* list_nth counts from zero */ return spatial_filter; }