From 0d8ef2d085d9fa3081eb99ac9e865d9e052f9190 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 5 Aug 2013 14:48:51 +0100 Subject: [PATCH] GRIB-396: Fix for 32bit platform opensuse103 test failures --- src/grib_iterator_class_regular.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/grib_iterator_class_regular.c b/src/grib_iterator_class_regular.c index 3476c04e2..715a4de3a 100644 --- a/src/grib_iterator_class_regular.c +++ b/src/grib_iterator_class_regular.c @@ -166,8 +166,10 @@ static int init(grib_iterator* i,grib_handle* h,grib_arguments* args) if (self->iScansNegatively) { idir=-idir; } else { + const double epsilon = 1e-6; if (lof+(nap-2)*idir>360) lof-=360; - else if (lof+(nap-1)*idir>360) { /*See GRIB-396*/ + else if ( (lof+(nap-1)*idir)-360 > epsilon ){ + /*See GRIB-396*/ idir=360.0/(float)nap; } }