Check result of grib_unpack_string

This commit is contained in:
Shahram Najm 2023-08-22 20:35:14 +01:00
parent b67defba92
commit 408e186241
1 changed files with 2 additions and 1 deletions

View File

@ -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);