Commit e8cb6da9 authored by mercury233's avatar mercury233

check opParam2 before recursion in ClientField::check_sum_trib

the other check_sum had done that
parent 6390d716
...@@ -1392,11 +1392,11 @@ bool ClientField::check_sum_trib(std::set<ClientCard*>::const_iterator index, st ...@@ -1392,11 +1392,11 @@ bool ClientField::check_sum_trib(std::set<ClientCard*>::const_iterator index, st
return false; return false;
int l1, l2; int l1, l2;
get_sum_params((*index)->opParam, l1, l2); get_sum_params((*index)->opParam, l1, l2);
if((acc + l1 >= select_min && acc + l1 <= select_max) || (acc + l2 >= select_min && acc + l2 <= select_max)) if((acc + l1 >= select_min && acc + l1 <= select_max) || (l2 > 0 && acc + l2 >= select_min && acc + l2 <= select_max))
return true; return true;
++index; ++index;
return check_sum_trib(index, end, acc + l1) return check_sum_trib(index, end, acc + l1)
|| check_sum_trib(index, end, acc + l2) || (l2 > 0 && check_sum_trib(index, end, acc + l2))
|| check_sum_trib(index, end, acc); || check_sum_trib(index, end, acc);
} }
template <class T> template <class T>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment