Incorrect dimension was used; should be NC_MAX_VAR_DIMS

This commit is contained in:
Greg Sjaardema 2015-11-30 10:32:53 -05:00
parent 073fa4c759
commit e430c1e3e1

View File

@ -1293,7 +1293,7 @@ test_ncattdel(path)
error("%s: ncinquire in data mode failed", pname);
ncclose(cdfid); return ++nerrs;
}
vtmp.dims = (int *) emalloc(sizeof(int) * MAX_VAR_DIMS);
vtmp.dims = (int *) emalloc(sizeof(int) * NC_MAX_VAR_DIMS);
vtmp.name = (char *) emalloc(MAX_NC_NAME);
if (ncvarinq(cdfid, yav_id, vtmp.name, &vtmp.type, &vtmp.ndims, vtmp.dims,
&natts) == -1) {