A calculation was using an integer 100000000000, which was being truncated:

source/blender/src/writeimage.c: In function `save_rendered_image_cb_real':
source/blender/src/writeimage.c:129: warning: integer constant is too large
for "long" type

Since the calculation is on a float anyway, changed constant to a float.

Ken
This commit is contained in:
Ken Hughes
2006-04-02 14:22:19 +00:00
parent 828cab295e
commit 8f38a91602

View File

@@ -126,7 +126,7 @@ static void save_rendered_image_cb_real(char *name, int zbuf)
end = ibuf->x * ibuf->y;
for(pixel = 0; pixel < end; pixel++, pixf+=4, pixc+=4) {
pixf[0] = pixf[1] = pixf[2] = pixf[3] = 1-rres.rectz[pixel]/100000000000;
pixf[0] = pixf[1] = pixf[2] = pixf[3] = 1-rres.rectz[pixel]/100000000000.0;
pixc[0] = pixc[1] = pixc[2] = pixc[3] = FTOCHAR(rres.rectz[pixel]);
}
ibuf->zbuf_float= rres.rectz;