Allow disabling debug categories with leading -

This was always supposed to work but the string_prefixes_string call
had the wrong order.
This commit is contained in:
ridiculousfish 2019-05-29 14:21:50 -07:00
parent 0863c237b0
commit ee9e5d4996

View file

@ -78,7 +78,7 @@ void activate_flog_categories_by_pattern(const wcstring &inwc) {
wcstring wc = inwc; wcstring wc = inwc;
std::replace(wc.begin(), wc.end(), L'_', L'-'); std::replace(wc.begin(), wc.end(), L'_', L'-');
for (const wcstring &s : split_string(wc, L',')) { for (const wcstring &s : split_string(wc, L',')) {
if (string_prefixes_string(s, L"-")) { if (string_prefixes_string(L"-", s)) {
apply_one_wildcard(s.substr(1), false); apply_one_wildcard(s.substr(1), false);
} else { } else {
apply_one_wildcard(s, true); apply_one_wildcard(s, true);