mirror of https://github.com/ecmwf/eccodes.git
ECC-1431: Simplified output buffer size formula
This commit is contained in:
parent
f1dd44073c
commit
ebf6d7897d
|
@ -511,7 +511,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
|||
grib_context_log(a->context, GRIB_LOG_DEBUG,"CCSDS pack_double: packing %s, %d values", a->name, n_vals);
|
||||
|
||||
/*ECC-1431: GRIB2: CCSDS encoding failure AEC_STREAM_ERROR*/
|
||||
buflen = buflen * 67.0/64 + 257;
|
||||
buflen += buflen / 20 + 256;
|
||||
buf = (unsigned char*)grib_context_buffer_malloc_clear(a->context, buflen);
|
||||
|
||||
if (!buf) {
|
||||
|
|
Loading…
Reference in New Issue