]> granicus.if.org Git - imagemagick/commitdiff
Throw exception instead of printing to stderr and adding missing exit (https://bugs...
authorDirk Lemstra <dirk@git.imagemagick.org>
Sat, 31 Mar 2018 14:39:13 +0000 (16:39 +0200)
committerDirk Lemstra <dirk@git.imagemagick.org>
Sat, 31 Mar 2018 14:39:13 +0000 (16:39 +0200)
MagickCore/draw.c

index bb5faf10a2fb7a947049b284a8009167444b5f3d..3caca1e5663068ce4c1979e9f986fb0eb94c6552 100644 (file)
@@ -6021,8 +6021,12 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path,
       default:
       {
         if (isalpha((int) ((unsigned char) attribute)) != 0)
-          (void) FormatLocaleFile(stderr,"attribute not recognized: %c\n",
-            attribute);
+          {
+            (void) ThrowMagickException(exception,GetMagickModule(),DrawError,
+              "attribute not recognized","`%c'",attribute);
+            primitive_info->coordinates=0;
+            return(0);
+          }
         break;
       }
     }