patch from Szekeres Istvan, bug #52560

2001-06-04  Havoc Pennington  <hp@redhat.com>

	* io-pnm.c (pnm_skip_whitespace): patch from Szekeres Istvan,
	bug #52560
This commit is contained in:
Havoc Pennington 2001-06-04 20:31:51 +00:00 committed by Havoc Pennington
parent a6eec2785d
commit 47af28acac
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2001-06-04 Havoc Pennington <hp@redhat.com>
* io-pnm.c (pnm_skip_whitespace): patch from Szekeres Istvan,
bug #52560
2001-06-01 Havoc Pennington <hp@redhat.com>
Apply patch from sandmann@daimi.au.dk, with some tweaks.

View File

@ -195,7 +195,14 @@ pnm_skip_whitespace (PnmIOBuffer *inbuf, GError **error)
for ( ; inptr < inend; inptr++) {
if (*inptr == '#') {
/* in comment - skip to the end of this line */
for ( ; *inptr != '\n' && inptr < inend; inptr++);
for ( ; *inptr != '\n' && inptr < inend; inptr++)
;
if ( *inptr != '\n' ) {
/* couldn't read whole comment */
return PNM_SUSPEND;
}
} else if (!isspace (*inptr)) {
inbuf->byte = inptr;
inbuf->nbytes = (guint) (inend - inptr);