MeasureCalc: Fixed error message from repeating when HighBound is smaller than LowBound

This commit is contained in:
Brian Ferguson 2013-12-06 20:55:50 -07:00
parent b7c6ec0e54
commit 3b1dfbac7e

View File

@ -105,11 +105,11 @@ void MeasureCalc::ReadOptions(ConfigParser& parser, const WCHAR* section)
oldUniqueRandom != m_UniqueRandom)
{
// Reset bounds if |m_LowBound| is greater than |m_HighBound|
if (m_LowBound > m_HighBound)
if (m_LowBound > m_HighBound && (
oldLowBound != m_LowBound ||
oldHighBound != m_HighBound))
{
LogErrorF(this, L"\"LowBound\" (%i) must be less then or equal to \"HighBound\" (%i)", m_LowBound, m_HighBound);
m_HighBound = m_LowBound;
}
// Reset the list if the bounds are changed
@ -202,7 +202,7 @@ int MeasureCalc::GetRandom()
{
int value = 0;
if (m_LowBound == m_HighBound)
if (m_LowBound == m_HighBound || m_LowBound > m_HighBound)
{
value = m_LowBound;
}