From: Cristy Date: Mon, 24 Apr 2017 00:46:57 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.5-5~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db01fc2607dc4a8dd9aebff76664e06008fe1244;p=imagemagick ... --- diff --git a/MagickCore/cache.c b/MagickCore/cache.c index 4cd6d898f..778117dff 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -3640,7 +3640,7 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode, (void) ClosePixelCacheOnDisk(cache_info); *cache_info->cache_filename='\0'; } - if (OpenPixelCacheOnDisk(cache_info,mode) == MagickFalse) + if (OpenPixelCacheOnDisk(cache_info,IOMode) == MagickFalse) { RelinquishMagickResource(DiskResource,cache_info->length); ThrowFileException(exception,CacheError,"UnableToOpenPixelCache", @@ -3818,7 +3818,7 @@ MagickExport MagickBooleanType PersistPixelCache(Image *image, MagickPathExtent); cache_info->type=DiskCache; cache_info->offset=(*offset); - if (OpenPixelCache(image,cache_info->mode,exception) == MagickFalse) + if (OpenPixelCache(image,ReadMode,exception) == MagickFalse) return(MagickFalse); *offset+=cache_info->length+page_size-(cache_info->length % page_size); return(MagickTrue); @@ -3862,7 +3862,7 @@ MagickExport MagickBooleanType PersistPixelCache(Image *image, cache_info->type=DiskCache; cache_info->offset=(*offset); cache_info=(CacheInfo *) image->cache; - status=OpenPixelCache(image,cache_info->mode,exception); + status=OpenPixelCache(image,IOMode,exception); if (status != MagickFalse) status=ClonePixelCacheRepository(cache_info,clone_info,exception); *offset+=cache_info->length+page_size-(cache_info->length % page_size);