dbertoni    01/08/10 10:51:42

  Modified:    c/src/XalanDOM XalanDOMString.cpp
  Log:
  Fixed assert.  Make sure target vectors are cleared when a transcoding error 
occurs.
  
  Revision  Changes    Path
  1.14      +7 -3      xml-xalan/c/src/XalanDOM/XalanDOMString.cpp
  
  Index: XalanDOMString.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XalanDOM/XalanDOMString.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XalanDOMString.cpp        2001/08/06 01:35:44     1.13
  +++ XalanDOMString.cpp        2001/08/10 17:51:42     1.14
  @@ -663,7 +663,7 @@
   {
        assert(theString != 0);
   
  -     assert(strlen(theString) < npos);
  +     assert(strlen(theString) < real_size_type(npos));
   
        return size_type(strlen(theString));
   }
  @@ -791,7 +791,7 @@
                }
                else
                {
  -                     theTargetVector.resize(0);
  +                     theTargetVector.clear();
                }
   
           return true;
  @@ -857,6 +857,8 @@
                //
                if (wcstombs(&theTargetVector[0], theTempSource, targetLen) == 
size_t(-1))
                {
  +                     theTargetVector.clear();
  +
                        return false;
                }
                else
  @@ -918,7 +920,7 @@
                }
                else
                {
  -                     theTargetVector.resize(0);
  +                     theTargetVector.clear();
                }
   
           return true;
  @@ -968,6 +970,8 @@
   
                if (mbstowcs(theTargetPointer, theSourceString, 
size_t(theSourceStringLength)) == size_t(-1))
                {
  +                     theTargetVector.clear();
  +
                        return false;
                }
                else
  
  
  

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

Reply via email to