Make RageTexture::GetTextureCoordRect wrap instead of seg fault when given an out of range frame.

This commit is contained in:
Kyzentun Keeslala
2015-06-18 23:30:24 -06:00
parent 42468ccccc
commit e91a858ddd
+1 -1
View File
@@ -76,7 +76,7 @@ void RageTexture::GetFrameDimensionsFromFileName( RString sPath, int* piFramesWi
const RectF *RageTexture::GetTextureCoordRect( int iFrameNo ) const
{
return &m_TextureCoordRects[iFrameNo];
return &m_TextureCoordRects[iFrameNo % GetNumFrames()];
}
// lua start