mirror of https://github.com/ecmwf/eccodes.git
ECC-455: Set of missingValue key in grib_filter not working as expected
This commit is contained in:
parent
e411d10cc3
commit
6442533f5f
|
@ -87,6 +87,12 @@ static void init_class(grib_expression_class* c)
|
||||||
static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)
|
static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)
|
||||||
{
|
{
|
||||||
grib_expression_double* e = (grib_expression_double*)g;
|
grib_expression_double* e = (grib_expression_double*)g;
|
||||||
|
|
||||||
|
if ( (long)(e->value) != e->value) {
|
||||||
|
grib_context_log(h->context, GRIB_LOG_ERROR,
|
||||||
|
"Converting %g to an integer leads to a possible loss of precision", e->value);
|
||||||
|
return GRIB_WRONG_CONVERSION;
|
||||||
|
}
|
||||||
*lres = e->value;
|
*lres = e->value;
|
||||||
return GRIB_SUCCESS;
|
return GRIB_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue