main: Off by one when dumping subsystem list

Fixes #40163

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet 2020-10-21 13:48:37 -04:00
parent c9ddf191cf
commit 0d420918e7

View file

@ -300,7 +300,7 @@ subsystems_thread_cleanup(void)
void
subsystems_dump_list(void)
{
for (unsigned i = 0; i < n_tor_subsystems - 1; ++i) {
for (unsigned i = 0; i < n_tor_subsystems; ++i) {
const subsys_fns_t *sys = tor_subsystems[i];
printf("% 4d\t%16s\t%s\n", sys->level, sys->name,
sys->location?sys->location:"");