]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Mon, 24 Apr 2017 00:46:57 +0000 (20:46 -0400)
committerCristy <urban-warrior@imagemagick.org>
Mon, 24 Apr 2017 00:46:57 +0000 (20:46 -0400)
MagickCore/cache.c

index 4cd6d898f76c21f8d22c63c16cac9d4124d0c83a..778117dff96a01acd16b9b1b08e049e690eb6730 100644 (file)
@@ -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);