diff --git a/src/grib_dumper_class_filter.c b/src/grib_dumper_class_filter.c index 762359133..01819831f 100644 --- a/src/grib_dumper_class_filter.c +++ b/src/grib_dumper_class_filter.c @@ -434,7 +434,7 @@ static void dump_string(grib_dumper* d,grib_accessor* a,const char* comment) err = grib_unpack_string(a,value,&size); p=value; r=get_key_rank(h,self->keys,a->name); - if (grib_is_missing_string(a,value,size)) + if (grib_is_missing_string(a,(unsigned char *)value,size)) return; while(*p) { if(!isprint(*p)) *p = '.'; p++; } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6390fa971..527941f75 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -56,6 +56,7 @@ list( APPEND tests2 bufr_ls bufr_change_edition ecc-197 + ecc-286 gts_get gts_ls gts_compare diff --git a/tests/bufr_dump.sh b/tests/bufr_dump.sh index defeac83d..b0425bb31 100755 --- a/tests/bufr_dump.sh +++ b/tests/bufr_dump.sh @@ -30,7 +30,7 @@ REDIRECT=/dev/null for file in ${bufr_files} do - ${tools_dir}bufr_dump -O ${data_dir}/bufr/$file + ${tools_dir}bufr_dump -O ${data_dir}/bufr/$file >/dev/null done #============================================== diff --git a/tests/ecc-286.sh b/tests/ecc-286.sh new file mode 100755 index 000000000..391d8998c --- /dev/null +++ b/tests/ecc-286.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# Copyright 2005-2016 ECMWF. +# +# This software is licensed under the terms of the Apache Licence Version 2.0 +# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. +# +# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by +# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. +# + +. ./include.sh + +# --------------------------------------------------------- +# This is the test for the JIRA issue ECC-286. +# It tests setting a key which starts with a digit +# --------------------------------------------------------- +cd ${data_dir}/bufr +label="ecc_286_test" + +tempRules=temp.${label}.filter +tempOut=temp.${label}.out +tempRef=temp.${label}.ref +BufrFile=syno_1.bufr + +cat > $tempRules < $tempOut + +cat > $tempRef <