Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/GridInsideHole.cpp
===================================================================
--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/GridInsideHole.cpp	(revision 13366)
+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/GridInsideHole.cpp	(revision 13367)
@@ -13,7 +13,7 @@
 
 int GridInsideHole(double* px0,double* py0,int n,double* x,double* y){
 
-	double flag=0.;
+	double flag=0.0;
 	double xA,xB,xC,xD,xE;
 	double yA,yB,yC,yD,yE;
 
@@ -29,17 +29,15 @@
 
 	/*D and E are on each side of segment [A B], on the median line between segment [A  B], 
 	 *at an angle of 10 degree (less than the minimum 30 enforced by the quality of the mesh: */
-
-
 	xD=xC+tan(10./180.*M_PI)*(yC-yA);
 	yD=yC+tan(10./180.*M_PI)*(xA-xC);
-
 	xE=xC-tan(10./180.*M_PI)*(yC-yA);
 	yE=yC-tan(10./180.*M_PI)*(xA-xC);
 
 	/*Either E or D is inside profile (x,y): */
 	IsInPolySerial(&flag,&xD,&yD,1,x,y,n,2);
-	if (flag){
+	/*FIXME: used to be 'flag' and not '!flag', check*/
+	if(!flag){
 		/*D is inside the poly: */
 		*px0=xD;
 		*py0=yD;
Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/IsInPolySerial.cpp
===================================================================
--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/IsInPolySerial.cpp	(revision 13366)
+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/IsInPolySerial.cpp	(revision 13367)
@@ -23,10 +23,10 @@
 		x0=x[i];
 		y0=y[i];
 		if (pnpoly(numvertices,xc,yc,x0,y0,edgevalue)){
-			in[i]=1;
+			in[i]=1.;
 		}
 		else{
-			in[i]=0;
+			in[i]=0.;
 		}
 	}
 
