X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=imago%2Fsrc%2Ffilergbe.c;h=7b242873e2b7d96161a43865bc8fa846c5d41e71;hb=56d0fddeeaee0ecb56cddc09db44bb87bf011314;hp=488f1ad13a2e406313f537f040e64d427da1d84c;hpb=773592751bbdef2f304725b24f620f89c9d4a5eb;p=dos_imgv diff --git a/imago/src/filergbe.c b/imago/src/filergbe.c index 488f1ad..7b24287 100644 --- a/imago/src/filergbe.c +++ b/imago/src/filergbe.c @@ -232,24 +232,24 @@ static int rgbe_write_header(struct img_io *io, int width, int height, rgbe_head } buf = malloc(ptypelen > 120 ? ptypelen + 8 : 128); sprintf(buf, "#?%s\n", programtype); - if(io->write(buf, strlen(buf), io->uptr) < 0) + if(io->write(buf, strlen(buf), io->uptr) <= 0) goto err; /* The #? is to identify file type, the programtype is optional. */ if(info && (info->valid & RGBE_VALID_GAMMA)) { sprintf(buf, "GAMMA=%g\n", info->gamma); - if(io->write(buf, strlen(buf), io->uptr) < 0) + if(io->write(buf, strlen(buf), io->uptr) <= 0) goto err; } if(info && (info->valid & RGBE_VALID_EXPOSURE)) { sprintf(buf, "EXPOSURE=%g\n", info->exposure); - if(io->write(buf, strlen(buf), io->uptr) < 0) + if(io->write(buf, strlen(buf), io->uptr) <= 0) goto err; } strcpy(buf, "FORMAT=32-bit_rle_rgbe\n\n"); - if(io->write(buf, strlen(buf), io->uptr) < 0) + if(io->write(buf, strlen(buf), io->uptr) <= 0) goto err; sprintf(buf, "-Y %d +X %d\n", height, width); - if(io->write(buf, strlen(buf), io->uptr) < 0) + if(io->write(buf, strlen(buf), io->uptr) <= 0) goto err; free(buf);