mirror of https://github.com/ecmwf/eccodes.git
GRIB-952: grib_set -r repacks values despite errors in setting the keys
This commit is contained in:
parent
b3da880512
commit
21bd5008d5
|
@ -120,8 +120,10 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
GRIB_CHECK_NOLINE(grib_get_double_array(h,"values",v,&size),0);
|
||||
}
|
||||
|
||||
if (options->set_values_count != 0)
|
||||
if (options->set_values_count != 0) {
|
||||
err=grib_set_values(h,options->set_values,options->set_values_count);
|
||||
if( err != GRIB_SUCCESS && options->fail) exit(err);
|
||||
}
|
||||
|
||||
if ( options->repack ) {
|
||||
|
||||
|
@ -136,7 +138,9 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (err == GRIB_SUCCESS) {
|
||||
GRIB_CHECK_NOLINE(grib_set_double_array(h,"values",v,size),0);
|
||||
}
|
||||
free(v);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue