mirror of https://github.com/ecmwf/eccodes.git
BUFR decode: Check error code before asserting
This commit is contained in:
parent
81c3b813ab
commit
523e950ea7
|
@ -646,6 +646,10 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
self->empty = 0;
|
||||
|
||||
err = grib_unpack_string(a, value, &size);
|
||||
if (err) {
|
||||
fprintf(self->dumper.out, " *** ERR=%d (%s) [dump_string on '%s']", err, grib_get_error_message(err), acc_name);
|
||||
return;
|
||||
}
|
||||
Assert(size < MAX_STRING_SIZE);
|
||||
p = value;
|
||||
r = compute_bufr_key_rank(h, self->keys, acc_name);
|
||||
|
|
Loading…
Reference in New Issue