From 7ddc88a430ae3caa06c36f7b6210c7b91ee64f28 Mon Sep 17 00:00:00 2001 From: Eugen Betke Date: Tue, 7 May 2024 10:03:49 +0000 Subject: [PATCH] Fix py_bufr_ecc-869.py test --- src/accessor/grib_accessor_class_bufr_data_array.cc | 6 ++++-- src/accessor/grib_accessor_class_gen.cc | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/accessor/grib_accessor_class_bufr_data_array.cc b/src/accessor/grib_accessor_class_bufr_data_array.cc index 0314effa0..14f13d966 100644 --- a/src/accessor/grib_accessor_class_bufr_data_array.cc +++ b/src/accessor/grib_accessor_class_bufr_data_array.cc @@ -2066,7 +2066,8 @@ int is_bitmap_start_descriptor(grib_accessors_list* al, int* err){ acode = al->accessor->get_attribute("code"); if (acode) - *err = acode->unpack_long(code, &l); else + *err = acode->unpack_long(code, &l); + else return 1; switch (code[0]) { @@ -2081,7 +2082,8 @@ int is_bitmap_start_descriptor(grib_accessors_list* al, int* err){ { //long index[1]; //grib_accessor* anindex=grib_accessor_get_attribute(al->accessor,"index"); - //anindex->unpack_long(index,&l); return 1; + //anindex->unpack_long(index,&l); + return 1; } } return 0; diff --git a/src/accessor/grib_accessor_class_gen.cc b/src/accessor/grib_accessor_class_gen.cc index cba6e3ae0..292c87c35 100644 --- a/src/accessor/grib_accessor_class_gen.cc +++ b/src/accessor/grib_accessor_class_gen.cc @@ -542,7 +542,7 @@ int grib_accessor_class_gen_t::pack_double(grib_accessor* a, const double* v, si is_overridden_[PACK_DOUBLE] = 0; grib_context* c = a->context; - if (strcmp(a->cclass->name, "codetable") == 0 || is_overridden_[PACK_LONG]) { + if (is_overridden_[PACK_LONG] || strcmp(a->cclass->name, "codetable") == 0) { /* ECC-648: Special case of codetable */ return pack_double_array_as_long(a, v, len); }