From 6df011e687945ba7e4d5ec110a87f43ad9e709ca Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 19 Mar 2020 12:44:17 +0000 Subject: [PATCH] ECC-1096: bufr_dump shows '2147483647' instead of 'null' --- src/grib_dumper_class_json.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/grib_dumper_class_json.c b/src/grib_dumper_class_json.c index bd2dd0b97..5d2f525eb 100644 --- a/src/grib_dumper_class_json.c +++ b/src/grib_dumper_class_json.c @@ -294,10 +294,14 @@ static void dump_long(grib_dumper* d, grib_accessor* a, const char* comment) } if (icount > cols) fprintf(self->dumper.out, "\n%-*s", depth, " "); - if (doing_unexpandedDescriptors) + if (doing_unexpandedDescriptors) { fprintf(self->dumper.out, "%06ld ", values[i]); - else - fprintf(self->dumper.out, "%ld ", values[i]); + } else { + if (grib_is_missing_long(a, values[i])) + fprintf(self->dumper.out, "%s", "null"); + else + fprintf(self->dumper.out, "%ld ", values[i]); + } depth -= 2; fprintf(self->dumper.out, "\n%-*s]", depth, " ");