From 9791b1a3978afb6b97e483c8b2ead586f51069f6 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Thu, 18 Feb 2016 14:45:57 -0700 Subject: [PATCH] Tentative fix for initial issue at http://github.com/Unidata/netcdf-c/issues/221 . investigating knock-on issues now. --- gdb.txt | 29 +++++++++++++++++------------ libsrc4/nc4hdf.c | 5 ++++- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/gdb.txt b/gdb.txt index 8b67f6f37..31d374d10 100644 --- a/gdb.txt +++ b/gdb.txt @@ -1,15 +1,20 @@ -set breakpoint pending on - -break nc4hdf.c:872 -command -watch provide_fill -c -end -break nc4hdf.c:974 -command -print fill_value_size -end +#---------- +# Solved first set of problems. On to second, in print_any_val. +#--------- +#set breakpoint pending on -break nc4hdf.c:1126 +#break nc4hdf.c:872 +#command +#watch provide_fill +#c +#end + + +#break nc4hdf.c:974 +#command +#print fill_value_size +#end + +#break nc4hdf.c:1126 diff --git a/libsrc4/nc4hdf.c b/libsrc4/nc4hdf.c index f90401aed..0b6aba7c1 100644 --- a/libsrc4/nc4hdf.c +++ b/libsrc4/nc4hdf.c @@ -1147,6 +1147,7 @@ nc4_get_vara(NC *nc, int ncid, int varid, const size_t *startp, filldata = (char *)data + real_data_size; for (i = 0; i < fill_len; i++) { + if (var->type_info->nc_type_class == NC_STRING) { if (*(char **)fillvalue) @@ -1157,7 +1158,9 @@ nc4_get_vara(NC *nc, int ncid, int varid, const size_t *startp, else *(char **)filldata = NULL; } - else + else if(var->type_info->nc_type_class == NC_VLEN) { + continue; + } else memcpy(filldata, fillvalue, file_type_size); filldata = (char *)filldata + file_type_size; }