Index: /issm/trunk-jpl/src/c/classes/Inputs2/TransientInput2.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs2/TransientInput2.cpp	(revision 24565)
+++ /issm/trunk-jpl/src/c/classes/Inputs2/TransientInput2.cpp	(revision 24566)
@@ -387,14 +387,16 @@
 void TransientInput2::SetAverageAsCurrentTimeInput(IssmDouble start_time,IssmDouble end_time){/*{{{*/
 
-	IssmDouble dt;
-	IssmDouble eps=1.0e-6;
-	IssmDouble dtsum=0;
-	int        found,start_offset,end_offset;
-	int        averaging_method = 0;
+	IssmDouble  dt;
+	IssmPDouble eps=1.0e-6;
+	IssmDouble  dtsum=0;
+	int         found,start_offset,end_offset;
+	int         averaging_method = 0;
 
 	/*go through the timesteps, and grab offset for start and end*/
-	found=binary_search(&start_offset,start_time-eps,this->timesteps,this->numtimesteps);
+	IssmDouble temp = start_time-eps;
+	found=binary_search(&start_offset,temp,this->timesteps,this->numtimesteps);
 	if(!found) _error_("Input not found (is TransientInput sorted ?)");
-	found=binary_search(&end_offset,end_time+eps,this->timesteps,this->numtimesteps);
+	temp = end_time+eps;
+	found=binary_search(&end_offset,temp,this->timesteps,this->numtimesteps);
 	if(!found) _error_("Input not found (is TransientInput sorted ?)");
 
