Fix a bug in search (selecting opposite types of operation)
This commit is contained in:
@@ -1328,7 +1328,8 @@ std::vector<Operation>* Database::Search(User* user, wxString* description, wxDa
|
||||
|
||||
if (types)
|
||||
{
|
||||
if ((types & FIX_OP) ^ (types & NON_FIX_OP))
|
||||
if (((types & FIX_OP) && !(types & NON_FIX_OP)) ||
|
||||
(!(types & FIX_OP) && (types & NON_FIX_OP)))
|
||||
{
|
||||
if (firstCond) req += wxT(" AND ") ; else firstCond = true;
|
||||
|
||||
@@ -1338,7 +1339,8 @@ std::vector<Operation>* Database::Search(User* user, wxString* description, wxDa
|
||||
req += wxT(" fix_cost='0'");
|
||||
}
|
||||
|
||||
if ((types & CHECKED_OP) ^ (types & NOT_CHECKED_OP))
|
||||
if (((types & CHECKED_OP) && !(types & NOT_CHECKED_OP)) ||
|
||||
(!(types & CHECKED_OP) && (types & NOT_CHECKED_OP)))
|
||||
{
|
||||
if (firstCond) req += wxT(" AND ") ; else firstCond = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user