diff --git a/src/grib_accessor_class_ascii.cc b/src/grib_accessor_class_ascii.cc index 46d18b63d..035b2c9cc 100644 --- a/src/grib_accessor_class_ascii.cc +++ b/src/grib_accessor_class_ascii.cc @@ -229,7 +229,8 @@ static int unpack_double(grib_accessor* a, double* v, size_t* len) size_t l = sizeof(val); char* last = NULL; - grib_unpack_string(a, val, &l); + int err = grib_unpack_string(a, val, &l); + if (err) return err; *v = strtod(val, &last);