src: fix debugging for multiple categories

Fix parsing of e.g. `NODE_DEBUG_NATIVE=worker,messaging`.

PR-URL: https://github.com/nodejs/node/pull/21422
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Anna Henningsen 2018-06-20 17:13:04 +02:00
parent 0eb8a8cb12
commit 7aa95670a1
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -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);
}
}