From: cristy Date: Wed, 11 Jan 2012 21:58:50 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6399 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3dee30d771583e7163162996ecae34129e55697;p=imagemagick --- diff --git a/coders/pnm.c b/coders/pnm.c index 906b21d43..4d21c3102 100644 --- a/coders/pnm.c +++ b/coders/pnm.c @@ -195,8 +195,11 @@ static size_t PNMInteger(Image *image,const unsigned int base, p=comment+strlen(comment); } c=ReadBlobByte(image); - *p=(char) c; - *(p+1)='\0'; + if (c != (int) '\n') + { + *p=(char) c; + *(p+1)='\0'; + } } if (comment == (char *) NULL) return(0);