From a4068abf6be9e3e775918fedec9412394ab391ea Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 19 May 2013 11:51:07 +0000 Subject: [PATCH] --- coders/pnm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/coders/pnm.c b/coders/pnm.c index 184f12cdf..8c0d6b009 100644 --- a/coders/pnm.c +++ b/coders/pnm.c @@ -339,6 +339,16 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception) { while (isspace((int) ((unsigned char) c)) != 0) c=ReadBlobByte(image); + if (c == '#') + { + /* + Comment. + */ + while ((c != EOF) && (c != '\n')) + c=ReadBlobByte(image); + while (isspace((int) ((unsigned char) c)) != 0) + c=ReadBlobByte(image); + } p=keyword; do { -- 2.40.0