[mapguide-commits] r6537 - trunk/MgDev/Server/src/Services/Feature

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Mar 8 22:19:33 EST 2012


Author: hubu
Date: 2012-03-08 19:19:33 -0800 (Thu, 08 Mar 2012)
New Revision: 6537

Modified:
   trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp
Log:
Fixed ticket #1965
https://trac.osgeo.org/mapguide/ticket/1965

Modified: trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp	2012-03-09 02:34:00 UTC (rev 6536)
+++ trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp	2012-03-09 03:19:33 UTC (rev 6537)
@@ -252,12 +252,15 @@
 
                 STRING::size_type nPropLength = propName.length();
                 STRING::size_type nPropStart = expression.rfind(propName);
-                STRING::size_type nPropEnd = expression.find(L")", nPropStart + 1);
+                if(nPropStart != STRING::npos)
+                {
+                    STRING::size_type nPropEnd = expression.find(L")", nPropStart + 1);
 
-                STRING newExpression = expression.substr(0, nPropStart);
-                newExpression += parsedPropertyName;
-                newExpression += expression.substr(nPropStart + nPropLength);
-                computedProperties->SetValue(aliasName, newExpression);
+                    STRING newExpression = expression.substr(0, nPropStart);
+                    newExpression += parsedPropertyName;
+                    newExpression += expression.substr(nPropStart + nPropLength);
+                    computedProperties->SetValue(aliasName, newExpression);
+                }
 
                 // Apply options to FDO command
                 ApplyQueryOptions(isSelectAggregate);



More information about the mapguide-commits mailing list