$OpenBSD: patch-source_blender_blenkernel_intern_subsurf_ccg_c,v 1.3 2006/07/26 06:45:27 steven Exp $
--- source/blender/blenkernel/intern/subsurf_ccg.c.orig	Sat Mar 11 17:13:09 2006
+++ source/blender/blenkernel/intern/subsurf_ccg.c	Fri Jul 21 16:51:10 2006
@@ -608,7 +608,7 @@ static DispListMesh *ss_to_displistmesh(
 				flags |= ME_SEAM;
 			}
 		} else {
-			int edgeIdx = (int) ccgSubSurf_getEdgeEdgeHandle(ss, e);
+			long edgeIdx = (long) ccgSubSurf_getEdgeEdgeHandle(ss, e);
 
 			if (edgeIdx!=-1) {
 				MEdge *origMed = &medge[edgeIdx];
@@ -652,7 +652,7 @@ static DispListMesh *ss_to_displistmesh(
 		int mapIndex = ccgDM_getFaceMapIndex(ccgdm, ss, f);
 
 		if (!ssFromEditmesh) {
-			int origIdx = (int) ccgSubSurf_getFaceFaceHandle(ss, f);
+			long origIdx = (long) ccgSubSurf_getFaceFaceHandle(ss, f);
 			MFace *origMFace = &mface[origIdx];
 			
 			if (tface) {
@@ -804,7 +804,8 @@ static void ss_sync_from_mesh(CCGSubSurf
 	int totvert = dlm?dlm->totvert:me->totvert;
 	int totedge = dlm?dlm->totedge:me->totedge;
 	int totface = dlm?dlm->totface:me->totface;
-	int i, index;
+	int index;
+	long i;
 
 	ccgSubSurf_initFullSync(ss);
 
@@ -1793,7 +1794,7 @@ void subsurf_calculate_limit_positions(M
 	vi = ccgSubSurf_getVertIterator(ss);
 	for (; !ccgVertIterator_isStopped(vi); ccgVertIterator_next(vi)) {
 		CCGVert *v = ccgVertIterator_getCurrent(vi);
-		int idx = (int) ccgSubSurf_getVertVertHandle(ss, v);
+		long idx = (long) ccgSubSurf_getVertVertHandle(ss, v);
 		int N = ccgSubSurf_getVertNumEdges(ss, v);
 		int numFaces = ccgSubSurf_getVertNumFaces(ss, v);
 		float *co;
