fix div/0 in LuaExpressionTransform::PositionItem
This commit is contained in:
@@ -131,7 +131,7 @@ void ActorScroller::LoadFromNode( const CString &sDir, const XNode *pNode )
|
||||
float fItemPaddingStart = 0;
|
||||
float fItemPaddingEnd = 0;
|
||||
CString sTransformFunction;
|
||||
int iSubdivisions = 0;
|
||||
int iSubdivisions = 1;
|
||||
|
||||
GET_VALUE( "SecondsPerItem", fSecondsPerItem );
|
||||
GET_VALUE( "NumItemsToDraw", fNumItemsToDraw );
|
||||
|
||||
@@ -11,6 +11,7 @@ LuaExpressionTransform::LuaExpressionTransform()
|
||||
|
||||
void LuaExpressionTransform::SetFromExpression( const CString &sExpression, int iNumSubdivisions )
|
||||
{
|
||||
ASSERT( iNumSubdivisions > 0 );
|
||||
m_pexprTransformFunction->SetFromExpression( sExpression );
|
||||
m_iNumSubdivisions = iNumSubdivisions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user