From 4cf4a84afba8cbb5125c791d5facc9a7241dba18 Mon Sep 17 00:00:00 2001 From: spx Date: Thu, 8 Apr 2010 23:47:52 +0000 Subject: [PATCH] Fixed a problem that "Random" doesn't return the HighBound value in CALC measure. --- Library/MeasureCalc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/MeasureCalc.cpp b/Library/MeasureCalc.cpp index 4c918de6..e3023d0a 100644 --- a/Library/MeasureCalc.cpp +++ b/Library/MeasureCalc.cpp @@ -154,7 +154,7 @@ void CMeasureCalc::RandomFormulaReplace() { if (wcsnicmp(L"Random", m_Formula.c_str() + loc, 6) == 0) { - int range = (m_HighBound - m_LowBound); + int range = (m_HighBound - m_LowBound) + 1; srand((unsigned) rand()); int randNumber = m_LowBound + (range * rand()/(RAND_MAX + 1.0));