mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
Catch Xarray dimension inconsistencies
This commit is contained in:
parent
7e48f2ad7b
commit
00a80ec8f9
@ -2163,9 +2163,12 @@ parsedimrefs(NC_FILE_INFO_T* file, NClist* dimnames, size64_t* shape, NC_DIM_INF
|
||||
/* If not found and create then create it */
|
||||
if((stat = createdim(file, dimname, shape[i], &dims[i])))
|
||||
goto done;
|
||||
} else {
|
||||
/* Verify consistency */
|
||||
if(dims[i]->len != shape[i])
|
||||
{stat = NC_EDIMSIZE; goto done;}
|
||||
}
|
||||
assert(dims[i] != NULL);
|
||||
assert(dims[i]->len == shape[i]);
|
||||
}
|
||||
done:
|
||||
nclistfreeall(segments);
|
||||
|
Loading…
Reference in New Issue
Block a user