mirror of https://github.com/ecmwf/eccodes.git
Check result of grib_unpack_string
This commit is contained in:
parent
b67defba92
commit
408e186241
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue