You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@locus.apache.org on 2000/05/24 21:18:12 UTC

cvs commit: xml-xalan/c/src/PlatformSupport DOMStringHelper.hpp

dbertoni    00/05/24 12:18:11

  Modified:    c/src/PlatformSupport DOMStringHelper.hpp
  Log:
  Added some safety to indexOf().
  
  Revision  Changes    Path
  1.21      +8 -1      xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp
  
  Index: DOMStringHelper.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- DOMStringHelper.hpp	2000/05/18 18:34:43	1.20
  +++ DOMStringHelper.hpp	2000/05/24 19:18:10	1.21
  @@ -294,7 +294,14 @@
   			const XalanDOMString&	theString,
   			XalanDOMChar			theChar)
   {
  -	return indexOf(c_wstr(theString), theChar);
  +	if (theString.length() == 0)
  +	{
  +		return 0;
  +	}
  +	else
  +	{
  +		return indexOf(c_wstr(theString), theChar);
  +	}
   }