ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/bmpfile.c
(Generate patch)

Comparing ray/src/common/bmpfile.c (file contents):
Revision 2.20 by greg, Wed Jan 23 19:13:55 2019 UTC vs.
Revision 2.21 by greg, Mon Oct 4 23:04:59 2021 UTC

# Line 151 | Line 151 | BMPopenReader(int (*cget)(void *), int (*seek)(uint32,
151  
152          if (cget == NULL)
153                  return NULL;
154 +        if (cget == &stdio_getc && c_data == NULL)
155 +                return NULL;                    /* stdio error condition */
156          magic[0] = (*cget)(c_data);
157          if (magic[0] != 'B')
158                  return NULL;
# Line 628 | Line 630 | BMPopenWriter(void (*cput)(int, void *), int (*seek)(u
630                                                  /* check arguments */
631          if (cput == NULL)
632                  return NULL;
633 +        if (cput == &stdio_putc && c_data == NULL)
634 +                return NULL;                    /* stdio error condition */
635          if (!BMPheaderOK(hdr))
636                  return NULL;
637          if ((hdr->bpp == 16) | (hdr->compr == BI_RLE4))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines