mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Fix chunk key when using dimension_separator
The construction of the chunk key is malformed when using dimension_separator rather than always using '/'. This is a priority bug.
This commit is contained in:
parent
669fd34357
commit
6b28409b54
@ -894,13 +894,11 @@ NCZ_chunkpath(struct ChunkKey key,char dimsep)
|
||||
{
|
||||
size_t plen = nulllen(key.varkey)+1+nulllen(key.chunkkey);
|
||||
char* path = (char*)malloc(plen+1);
|
||||
char sdimsep[2];
|
||||
|
||||
if(path == NULL) return NULL;
|
||||
path[0] = '\0';
|
||||
strlcat(path,key.varkey,plen+1);
|
||||
sdimsep[0] = dimsep; sdimsep[1] = '\0';
|
||||
strlcat(path,sdimsep,plen+1);
|
||||
strlcat(path,"/",plen+1);
|
||||
strlcat(path,key.chunkkey,plen+1);
|
||||
return path;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user