Simple packing: corner case of bpv>0 for a constant field

This commit is contained in:
Shahram Najm 2022-05-09 15:44:47 +01:00
parent 971048a3ef
commit a9b36b4ec4
1 changed files with 9 additions and 0 deletions

View File

@ -400,6 +400,15 @@ static int _unpack_double(grib_accessor* a, double* val, size_t* len, unsigned c
return GRIB_DECODING_ERROR; return GRIB_DECODING_ERROR;
} }
} }
#if 0
if (offsetBeforeData == offsetAfterData) {
/* Crazy case: Constant field with bitsPerValue > 0 */
for (i = 0; i < n_vals; i++)
val[i] = reference_value;
*len = n_vals;
return GRIB_SUCCESS;
}
#endif
} }
grib_context_log(a->context, GRIB_LOG_DEBUG, grib_context_log(a->context, GRIB_LOG_DEBUG,