minor update for special cases of union testing results

This commit is contained in:
Miroslav Stampar 2011-03-28 21:45:38 +00:00
parent ae53ad4c30
commit 1823c116bb

View File

@ -86,8 +86,10 @@ def __findUnionCharCount(comment, place, parameter, value, prefix, suffix, where
if min_ < lower: if min_ < lower:
retVal = minItem[0] retVal = minItem[0]
elif max_ > upper:
retVal = maxItem[0] if max_ > upper:
if retVal is None or abs(max_ - upper) > abs(min_ - lower):
retVal = maxItem[0]
kb.errorIsNone = popValue() kb.errorIsNone = popValue()