diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 97f64ae..50e6e2a 100644 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -2656,7 +2656,7 @@ void XMLPrinter::Write( const char* data, size_t size ) fwrite ( data , sizeof(char), size, _fp); } else { - char* p = _buffer.PushArr( static_cast(size) ) - 1; // back up over the null terminator. + char* p = _buffer.PushArr( size ) - 1; // back up over the null terminator. memcpy( p, data, size ); p[size] = 0; }