[mapserver-commits] r9606 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Dec 9 08:19:13 EST 2009
Author: aboudreault
Date: 2009-12-09 08:19:10 -0500 (Wed, 09 Dec 2009)
New Revision: 9606
Modified:
trunk/mapserver/mapstring.c
Log:
Correct a possible misuse of msStringSplitComplex function
Modified: trunk/mapserver/mapstring.c
===================================================================
--- trunk/mapserver/mapstring.c 2009-12-09 03:08:14 UTC (rev 9605)
+++ trunk/mapserver/mapstring.c 2009-12-09 13:19:10 UTC (rev 9606)
@@ -776,19 +776,18 @@
* and for literal double quotes) will be preserved in the tokens, otherwise
* the backslashes will be removed in processing.
*/
-char **msStringSplitComplex(const char *string, const char *delimiters, int *num_tokens, int CSLTFlags)
+char **msStringSplitComplex(const char *string, char ch, int *num_tokens, int CSLTFlags)
{
char **tokens;
#ifdef USE_GDAL
+ char delimiter[2] = {ch, '\0'};
int i;
- tokens = CSLTokenizeString2(string, delimiters, CSLTFlags);
+ tokens = CSLTokenizeString2(string, &delimiter[0], CSLTFlags);
*num_tokens = 0;
for (i = 0; tokens != NULL && tokens[i] != NULL; ++i)
++(*num_tokens);
#else
- tokens = msStringSplit(string,
- delimiters ? (char)delimiters[0] : '\0',
- num_tokens);
+ tokens = msStringSplit(string, ch, num_tokens);
#endif
return tokens;
More information about the mapserver-commits
mailing list