From f470abc2103133f7b598c9cb403dc7614dfebef1 Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 8 Oct 2019 09:09:53 -0400 Subject: [PATCH] Fix logic --- MagickCore/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MagickCore/string.c b/MagickCore/string.c index 9af4d3d7e3..284614b5d0 100644 --- a/MagickCore/string.c +++ b/MagickCore/string.c @@ -2592,7 +2592,7 @@ MagickExport MagickBooleanType SubstituteString(char **string, { if (search_extent == 0) search_extent=strlen(search); - if ((*p == *search) && (strncmp(p,search,search_extent) != 0)) + if ((*p != *search) || (strncmp(p,search,search_extent) != 0)) continue; /* We found a match.