[mapguide-commits] r4324 - trunk/MgDev/Common/CoordinateSystem

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Oct 28 18:44:14 EDT 2009


Author: NormOlsen
Date: 2009-10-28 18:44:13 -0400 (Wed, 28 Oct 2009)
New Revision: 4324

Modified:
   trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp
Log:
Corrects Trac Ticket #1134.

In calling to the CS-MAP library to obtain the MGRS designation for a specific location, the
CCoordinateSystemMgrs::ConvertFromLonLat function was passing an incorrect value as the size of the result character array.  The result was a truncation in the result to less than the requested number of digits.

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp	2009-10-28 00:17:22 UTC (rev 4323)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp	2009-10-28 22:44:13 UTC (rev 4324)
@@ -541,7 +541,7 @@
     nPrecision = nPrecision>5 ? 5 : nPrecision;
     nPrecision = nPrecision<0 ? 0 : nPrecision;
 
-    int nResult=CScalcMgrsFromLl (m_pCsMgrs, szMgrs, (int)strlen(szMgrs), latLng, nPrecision);
+    int nResult=CScalcMgrsFromLl (m_pCsMgrs, szMgrs, sizeof(szMgrs), latLng, nPrecision);
     if (0==nResult)
     {
         //success, return the MGRS string



More information about the mapguide-commits mailing list