diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp
index 43512372b13723f15bd2bb7a59537f963a189f2e..0059bfd2dc6ccf632575e098e2c6e2dea192aaef 100644
--- a/indra/newview/lllocationhistory.cpp
+++ b/indra/newview/lllocationhistory.cpp
@@ -47,8 +47,10 @@ void addLocationHistory()
 {	
 	LLVector3 position = gAgent.getPositionAgent();
 	std::string region_name = gAgent.getRegion()->getName();
-	std::string location = LLSLURL::buildSLURL(region_name, position.mV[VX], 
-		                                       position.mV[VY], position.mV[VZ]);
+	std::string location = LLSLURL::buildSLURL(region_name,
+			(S32)(position.mV[VX]), 
+		    (S32)(position.mV[VY]), 
+			(S32)(position.mV[VZ]) );
 	LLLocationHistory* lh = LLLocationHistory::getInstance();
 	lh->addItem(location);
 	lh->save();