Merge branch 'patch-26' of https://github.com/gsjaardema/netcdf-c into v4.6.2-release-branch.wif

This commit is contained in:
Ward Fisher 2018-10-23 15:51:04 -06:00
commit c97e4b144e

View File

@ -446,7 +446,7 @@ memio_pad_length(ncio* nciop, off_t length)
if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
memio = (NCMEMIO*)nciop->pvt;
if(fIsSet(nciop->ioflags,NC_WRITE))
if(!fIsSet(nciop->ioflags,NC_WRITE))
return EPERM; /* attempt to write readonly file*/
if(memio->locked)
return NC_EINMEMORY;