From d37eff63921ab2cc9b6aeddf2a07a8aa26186bdc Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 3 Feb 2019 19:16:38 -0500 Subject: [PATCH] ... --- MagickCore/constitute.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/MagickCore/constitute.c b/MagickCore/constitute.c index 4b16e4c18..051ea5aad 100644 --- a/MagickCore/constitute.c +++ b/MagickCore/constitute.c @@ -629,14 +629,23 @@ MagickExport Image *ReadImage(const ImageInfo *image_info, (void) RelinquishUniqueFileResource(read_info->filename); if (IsSceneGeometry(read_info->scenes,MagickFalse) != MagickFalse) { + int + first_scene, + last_scene, + n; + Image *clones; - clones=CloneImages(image,read_info->scenes,exception); - if (clones != (Image *) NULL) + n=sscanf(read_info->scenes,"%d-%d",&first_scene,&last_scene); + if (n != 2) { - image=DestroyImageList(image); - image=GetFirstImageInList(clones); + clones=CloneImages(image,read_info->scenes,exception); + if (clones != (Image *) NULL) + { + image=DestroyImageList(image); + image=GetFirstImageInList(clones); + } } } for (next=image; next != (Image *) NULL; next=GetNextImageInList(next)) -- 2.40.0