commit | 30bdc9735b4f3c5487bb093a9b54cb1cc857f378 | [log] [tgz] |
---|---|---|
author | Dmitry-Me <wipedout@yandex.ru> | Wed Jan 14 08:32:23 2015 +0300 |
committer | Dmitry-Me <wipedout@yandex.ru> | Wed Jan 14 08:32:23 2015 +0300 |
tree | 728699dc9ebdfcd380482d659f61a6975afc17e2 | |
parent | 38b49ae042125f33537bbdc45bc06874a78ec80a [diff] [blame] |
Pre-asserts to clarify buffer usage
diff --git a/tinyxml2.cpp b/tinyxml2.cpp index dd8e3fd..ca6c566 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp
@@ -1997,6 +1997,7 @@ // Close out and re-start the va-args va_end( va ); va_start( va, format ); + TIXMLASSERT( _buffer.Size() > 0 && _buffer[_buffer.Size() - 1] == 0 ); char* p = _buffer.PushArr( len ) - 1; // back up over the null terminator. #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) #if defined(WINCE)