$OpenBSD: patch-source_blender_render_intern_source_shadbuf_c,v 1.8 2013/05/18 22:01:28 pascal Exp $
--- source/blender/render/intern/source/shadbuf.c.orig	Thu Jan 24 22:57:13 2013
+++ source/blender/render/intern/source/shadbuf.c	Fri May  3 22:39:46 2013
@@ -1040,7 +1040,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf
 {
 	float temp;
 	int *rz, ofs;
-	int zsamp=0;
+	long zsamp=0;
 	char *ct, *cz;
 
 	/* simpleclip */
@@ -1069,7 +1069,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];
@@ -1078,7 +1078,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];
@@ -1227,7 +1227,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 */
@@ -1253,7 +1254,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];
@@ -1262,7 +1263,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];
