From 3dedcc4b7350c5ac7e6b5bdb2b03e3b4830cb392 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Fri, 12 Jul 2019 10:36:52 +0200 Subject: [PATCH] Some more refactoring. --- coders/ps.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/coders/ps.c b/coders/ps.c index 5e98b3580..04c72a6d5 100644 --- a/coders/ps.c +++ b/coders/ps.c @@ -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. */ -- 2.40.0