mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
clean up malformed stream conversion
reinterpret_cast was misaligning the pointer. just use the already leveraged dynamic_cast
This commit is contained in:
parent
4c58a3601f
commit
96f001b0e6
1 changed files with 3 additions and 2 deletions
|
|
@ -39,9 +39,10 @@ SFXMemoryStream::SFXMemoryStream( const SFXFormat& format,
|
|||
|
||||
void SFXMemoryStream::reset()
|
||||
{
|
||||
if( dynamic_cast< IResettable* >( getSourceStream() ) )
|
||||
IResettable* rStream = dynamic_cast<IResettable*>(getSourceStream());
|
||||
if(rStream )
|
||||
{
|
||||
reinterpret_cast< IResettable* >( getSourceStream() )->reset();
|
||||
rStream->reset();
|
||||
|
||||
if( mCurrentPacket )
|
||||
destructSingle( mCurrentPacket );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue