$OpenBSD: patch-source_blender_render_intern_source_shadbuf_c,v 1.7 2012/10/31 17:45:55 pascal Exp $
--- source/blender/render/intern/source/shadbuf.c.orig	Tue Oct  9 20:38:25 2012
+++ source/blender/render/intern/source/shadbuf.c	Fri Oct 12 18:01:14 2012
@@ -1041,7 +1041,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf
 {
 	float temp;
 	int *rz, ofs;
-	int zsamp=0;
+	long zsamp=0;
 	char *ct, *cz;
 
 	/* simpleclip */
@@ -1070,7 +1070,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];
@@ -1079,7 +1079,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];
@@ -1228,7 +1228,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 */
@@ -1254,7 +1255,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];
@@ -1263,7 +1264,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];
