dbertoni    2004/11/01 14:21:26

  Modified:    c/src/xalanc/XMLSupport FormatterToXML_UTF16.cpp
  Log:
  Patch for Jira XALANC-438.
  
  Revision  Changes    Path
  1.11      +9 -3      
xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.cpp
  
  Index: FormatterToXML_UTF16.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FormatterToXML_UTF16.cpp  20 Apr 2004 01:19:58 -0000      1.10
  +++ FormatterToXML_UTF16.cpp  1 Nov 2004 22:21:26 -0000       1.11
  @@ -84,7 +84,10 @@
   inline void
   FormatterToXML_UTF16::flushBuffer()
   {
  -     m_writer->write((const char*)m_buffer, 0, (m_bufferPosition - m_buffer) 
* sizeof m_buffer[0]);
  +     m_writer->write(
  +        reinterpret_cast<const char*>(m_buffer),
  +        0,
  +        (m_bufferPosition - m_buffer) * sizeof m_buffer[0]);
   
        m_bufferPosition = m_buffer;
        m_bufferRemaining = kBufferSize;
  @@ -97,11 +100,14 @@
                        const XalanDOMChar*                     theChars,
                        XalanDOMString::size_type       theLength)
   {
  -     if (theLength > sizeof(m_buffer))
  +     if (theLength > XalanDOMString::size_type(kBufferSize))
        {
                flushBuffer();
   
  -             m_writer->write(theChars, 0, theLength);
  +             m_writer->write(
  +            reinterpret_cast<const char*>(theChars),
  +            0,
  +            theLength * sizeof(theChars[0]));
        }
        else
        {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to