diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 14cc91a..b8555c3 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -1927,7 +1927,7 @@ void XMLDocument::Parse() TIXMLASSERT( _charBuffer ); char* p = _charBuffer; p = XMLUtil::SkipWhiteSpace( p ); - p = (char*) XMLUtil::ReadBOM( p, &_writeBOM ); + p = const_cast( XMLUtil::ReadBOM( p, &_writeBOM ) ); if ( !*p ) { SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 ); return;