game: fix integer division by zero in baseachievement( fixes #87 )

This commit is contained in:
nillerusr 2022-07-31 04:40:53 +03:00
parent 7268663f24
commit 97e7d4a870

View File

@ -276,7 +276,9 @@ void CBaseAchievement::SetShowOnHUD( bool bShow )
void CBaseAchievement::HandleProgressUpdate() void CBaseAchievement::HandleProgressUpdate()
{ {
// which notification is this // which notification is this
int iProgress = m_iCount / m_iProgressMsgIncrement; int iProgress = -1;
if( m_iProgressMsgIncrement > 0 ) iProgress = m_iCount / m_iProgressMsgIncrement;
// if we haven't already shown this progress step, show it // if we haven't already shown this progress step, show it
if ( iProgress > m_iProgressShown || m_iCount == 1 ) if ( iProgress > m_iProgressShown || m_iCount == 1 )
{ {