From 029b9c8128ea09322b919f47e3bc028d00bb56d1 Mon Sep 17 00:00:00 2001 From: cristy Date: Thu, 18 Dec 2014 00:51:12 +0000 Subject: [PATCH] --- coders/pnm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/coders/pnm.c b/coders/pnm.c index 67325a2a1..ef1f7c21b 100644 --- a/coders/pnm.c +++ b/coders/pnm.c @@ -135,7 +135,7 @@ static MagickBooleanType IsPNM(const unsigned char *magick,const size_t extent) % o exception: return any errors or warnings in this structure. % */ -static void PNMComment(Image *image,ExceptionInfo *exception) +static int PNMComment(Image *image,ExceptionInfo *exception) { int c; @@ -174,9 +174,10 @@ static void PNMComment(Image *image,ExceptionInfo *exception) } } if (comment == (char *) NULL) - return; + return(c); (void) SetImageProperty(image,"comment",comment,exception); comment=DestroyString(comment); + return(c); } static unsigned int PNMInteger(Image *image,const unsigned int base, @@ -197,7 +198,7 @@ static unsigned int PNMInteger(Image *image,const unsigned int base, if (c == EOF) return(0); if (c == (int) '#') - PNMComment(image,exception); + c=PNMComment(image,exception); } while ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r')); if (base == 2) return((unsigned int) (c-(int) '0')); @@ -331,7 +332,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Comment. */ - PNMComment(image,exception); + c=PNMComment(image,exception); c=ReadBlobByte(image); while (isspace((int) ((unsigned char) c)) != 0) c=ReadBlobByte(image); -- 2.50.1