diff --git a/src/env.cc b/src/env.cc index 6f6e9f3920f4b1..2236893dd77923 100644 --- a/src/env.cc +++ b/src/env.cc @@ -537,7 +537,7 @@ void Environment::set_debug_categories(const std::string& cats, bool enabled) { if (comma_pos == std::string::npos) break; // Use everything after the `,` as the list for the next iteration. - debug_categories = debug_categories.substr(comma_pos); + debug_categories = debug_categories.substr(comma_pos + 1); } }