You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by jp...@locus.apache.org on 2000/07/21 19:39:29 UTC

cvs commit: xml-xerces/c/samples/DOMPrint DOMPrint.cpp

jpolast     00/07/21 10:39:29

  Modified:    c/samples/DOMPrint DOMPrint.cpp
  Log:
  fix for null CDATA sections in the formatter.
  
  Revision  Changes    Path
  1.19      +5 -1      xml-xerces/c/samples/DOMPrint/DOMPrint.cpp
  
  Index: DOMPrint.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/DOMPrint/DOMPrint.cpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DOMPrint.cpp	2000/06/20 01:06:26	1.18
  +++ DOMPrint.cpp	2000/07/21 17:39:28	1.19
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: DOMPrint.cpp,v 1.18 2000/06/20 01:06:26 rahulj Exp $
  + * $Id: DOMPrint.cpp,v 1.19 2000/07/21 17:39:28 jpolast Exp $
    */
   
   
  @@ -736,6 +736,10 @@
   XMLFormatter& operator<< (XMLFormatter& strm, const DOMString& s)
   {
       unsigned int lent = s.length();
  +
  +	if (lent <= 0)
  +		return strm;
  +
       XMLCh*  buf = new XMLCh[lent + 1];
       XMLString::copyNString(buf, s.rawBuffer(), lent);
       buf[lent] = 0;