$OpenBSD: patch-source_blender_render_intern_source_shadbuf_c,v 1.4 2009/10/25 22:41:25 steven Exp $
--- source/blender/render/intern/source/shadbuf.c.orig	Tue Sep  1 17:20:59 2009
+++ source/blender/render/intern/source/shadbuf.c	Sat Oct 10 19:25:01 2009
@@ -592,7 +592,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf
 {
 	float temp;
 	int *rz, ofs;
-	int zsamp=0;
+	long zsamp=0;
 	char *ct, *cz;
 
 	/* simpleclip */
@@ -618,7 +618,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];
@@ -627,7 +627,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];
@@ -772,7 +772,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 */
@@ -798,7 +799,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];
@@ -807,7 +808,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];
