]> granicus.if.org Git - imagemagick/commitdiff
Some more refactoring.
authorDirk Lemstra <dirk@lemstra.org>
Fri, 12 Jul 2019 08:36:52 +0000 (10:36 +0200)
committerDirk Lemstra <dirk@lemstra.org>
Fri, 12 Jul 2019 08:36:52 +0000 (10:36 +0200)
coders/ps.c

index 5e98b3580d50b0def4cd97ee4df223952d685b5e..04c72a6d55c06b75fafc9aa49c185bed09834c62 100644 (file)
@@ -291,11 +291,20 @@ static void ReadPSInfo(const ImageInfo *image_info,Image *image,
   buffer.image=image;
   for (c=ReadByteBuffer(&buffer); c != EOF; c=ReadByteBuffer(&buffer))
   {
-    if (c == '<')
+    switch(c)
+    {
+      case '<':
       {
         ReadGhostScriptXMPProfile(&buffer,&ps_info->xmp_profile);
         continue;
       }
+      case '\n':
+      case '\r':
+      case '%':
+        break;
+      default:
+        continue;
+    }
     /*
       Note document structuring comments.
     */