Skip to content

Commit

Permalink
Fix the display of number of running tasks
Browse files Browse the repository at this point in the history
This was broken by a logic change in 72235d8.

Fixes: htop-dev#1369
  • Loading branch information
BenBE committed Jan 12, 2024
1 parent 046b6ce commit b6b9384
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions linux/LinuxMachine.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,7 @@ static void LinuxMachine_scanCPUTime(LinuxMachine* this) {
char buffer[PROC_LINE_LENGTH + 1];
while (fgets(buffer, sizeof(buffer), file)) {
if (String_startsWith(buffer, "procs_running")) {
ProcessTable* pt = (ProcessTable*) super->processTable;
pt->runningTasks = strtoul(buffer + strlen("procs_running"), NULL, 10);
this->runningTasks = strtoul(buffer + strlen("procs_running"), NULL, 10);
break;
}
}
Expand Down

0 comments on commit b6b9384

Please sign in to comment.