$OpenBSD: patch-source_blender_render_intern_source_shadbuf_c,v 1.3 2007/05/25 12:19:14 steven Exp $
--- source/blender/render/intern/source/shadbuf.c.orig	Mon Apr 30 16:51:20 2007
+++ source/blender/render/intern/source/shadbuf.c	Sun May 20 15:02:42 2007
@@ -483,7 +483,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf
 {
 	float temp;
 	int *rz, ofs;
-	int zsamp=0;
+	long zsamp=0;
 	char *ct, *cz;
 
 	/* simpleclip */
@@ -509,7 +509,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf
 	else if(*ct==2) {
 		ct= ((char *)rz);
 		ct+= 4+2*16*(ys & 15)+2*(xs & 15);
-		zsamp= *rz;
+		zsamp= (long) *rz;
 	
 		cz= (char *)&zsamp;
 		cz[BCOMP]= ct[0];
@@ -518,7 +518,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf
 	else if(*ct==1) {
 		ct= ((char *)rz);
 		ct+= 4+16*(ys & 15)+(xs & 15);
-		zsamp= *rz;
+		zsamp= (long) *rz;
 
 		cz= (char *)&zsamp;
 		cz[GCOMP]= ct[0];
@@ -527,7 +527,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf
 	else {
 		/* got warning on this for 64 bits.... */
 		/* but it's working code! in this case rz is not a pointer but zvalue (ton) */
- 		zsamp= (int) rz;
+ 		zsamp= (long) rz;
 	}
 
 	/* tricky stuff here; we use ints which can overflow easily with bias values */
@@ -660,7 +660,8 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSamp
 {
 	float temp;
 	int *rz, ofs;
-	int bias, zbias, zsamp;
+	int bias, zbias;
+	long zsamp;
 	char *ct, *cz;
 
 	/* negative! The other side is more important */
@@ -686,7 +687,7 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSamp
 	else if(*ct==2) {
 		ct= ((char *)rz);
 		ct+= 4+2*16*(ys & 15)+2*(xs & 15);
-		zsamp= *rz;
+		zsamp= (long) *rz;
 	
 		cz= (char *)&zsamp;
 		cz[BCOMP]= ct[0];
@@ -695,7 +696,7 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSamp
 	else if(*ct==1) {
 		ct= ((char *)rz);
 		ct+= 4+16*(ys & 15)+(xs & 15);
-		zsamp= *rz;
+		zsamp= (long) *rz;
 
 		cz= (char *)&zsamp;
 		cz[GCOMP]= ct[0];
@@ -704,7 +705,7 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSamp
 	else {
 		/* same as before */
 		/* still working code! (ton) */
- 		zsamp= (int) rz;
+ 		zsamp= (long) rz;
 	}
 
 	/* NO schadow when sampled at 'eternal' distance */
