Return 1 from SetPosition(n) on success, 0 on seek past EOF, not
"the position seeked to". This fixes a special case: SetPosition(n) returning 0 was EOF except when SetPosition(0). The returned value on success was always n, anyway; we never seek to a different position and return success.
This commit is contained in:
@@ -206,7 +206,7 @@ int RageSoundReader_Chain::SetPosition( int iFrame )
|
||||
RageSoundReader *pReader = pSound->pSound;
|
||||
|
||||
int iOffsetFrames = iFrame - iOffsetFrame;
|
||||
if( iOffsetFrames > 0 && pReader->SetPosition(iOffsetFrames) == 0 )
|
||||
if( pReader->SetPosition(iOffsetFrames) == 0 )
|
||||
{
|
||||
/* We're past the end of this sound. */
|
||||
ReleaseSound( pSound );
|
||||
|
||||
Reference in New Issue
Block a user