DatabaseCommands: disallow "grouping" by the selected tag

Fixes assertion failure.
This commit is contained in:
Max Kellermann 2014-04-25 11:28:17 +02:00
parent ecc12c9ba1
commit 95b1a640b6

View File

@ -234,6 +234,13 @@ handle_list(Client &client, int argc, char *argv[])
}
}
if (tagType < TAG_NUM_OF_ITEM_TYPES &&
group_mask & (1u << tagType)) {
delete filter;
command_error(client, ACK_ERROR_ARG, "Conflicting group");
return CommandResult::ERROR;
}
Error error;
CommandResult ret =
listAllUniqueTags(client, tagType, group_mask, filter, error)