You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2003/11/03 16:35:53 UTC

cvs commit: xml-xerces/c/src/xercesc/util XMLString.cpp

amassari    2003/11/03 07:35:53

  Modified:    c/src/xercesc/util XMLString.cpp
  Log:
  A version of lastIndexOf would crash the application if the character to be searched was not found in the string
  
  Revision  Changes    Path
  1.27      +2 -2      xml-xerces/c/src/xercesc/util/XMLString.cpp
  
  Index: XMLString.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLString.cpp,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- XMLString.cpp	1 Nov 2003 20:24:23 -0000	1.26
  +++ XMLString.cpp	3 Nov 2003 15:35:52 -0000	1.27
  @@ -1226,7 +1226,7 @@
                              const XMLCh* const toSearch,
                              const unsigned int toSearchLen)
   {
  -    for (unsigned int i = toSearchLen-1; i >= 0; i--)
  +    for (int i = (int)toSearchLen-1; i >= 0; i--)
       {
           if (toSearch[i] == ch)
               return i;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org