From f1e9143b59bfac8018c0504c82e242602259f74c Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 20 Jan 2022 14:40:06 +0000 Subject: [PATCH] Experimental: setting MISSING as a valid value (for now disabled) --- src/grib_accessor_class_long.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/grib_accessor_class_long.c b/src/grib_accessor_class_long.c index 6350ef106..adc3659fb 100644 --- a/src/grib_accessor_class_long.c +++ b/src/grib_accessor_class_long.c @@ -295,7 +295,16 @@ static int compare(grib_accessor* a, grib_accessor* b) static int pack_string(grib_accessor* a, const char* val, size_t* len) { char* theEnd = NULL; - long v = strtol(val, &theEnd, 10); + long v = 0; + +#if 0 + /* Requires more work e.g. filter */ + if (strcmp_nocase(val, "missing")==0) { + return pack_missing(a); + } +#endif + + v = strtol(val, &theEnd, 10); if (theEnd) { grib_context_log(a->context, GRIB_LOG_ERROR, "trying to pack \"%s\" as long", val); return GRIB_WRONG_TYPE;