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);
  +     }
   }
   
   
  
  
  

Reply via email to