Merge pull request #197 from Dmitry-Me/dontAdjustStartWhenNeedsDelete

Assert when trying to adjust _start in "needs delete" mode.
This commit is contained in:
Lee Thomason 2014-08-20 10:03:43 -07:00
commit dc50a31758
1 changed files with 2 additions and 0 deletions

View File

@ -150,6 +150,8 @@ char* StrPair::ParseName( char* p )
void StrPair::CollapseWhitespace()
{
// Adjusting _start would cause undefined behavior on delete[]
TIXMLASSERT( ( _flags & NEEDS_DELETE ) == 0 );
// Trim leading space.
_start = XMLUtil::SkipWhiteSpace( _start );