Fixed: Process nice value underflowing, issue #461

This commit is contained in:
aristocratos 2022-11-06 11:32:17 +01:00
parent c52206610d
commit 5a53fb4a2c
2 changed files with 2 additions and 2 deletions

View file

@ -262,7 +262,7 @@ namespace Proc {
double cpu_p{}; // defaults to = 0.0
double cpu_c{}; // defaults to = 0.0
char state = '0';
uint64_t p_nice{}; // defaults to 0
int64_t p_nice{}; // defaults to 0
uint64_t ppid{}; // defaults to 0
uint64_t cpu_s{}; // defaults to 0
uint64_t cpu_t{}; // defaults to 0

View file

@ -1884,7 +1884,7 @@ namespace Proc {
next_x = 19;
continue;
case 19: //? Nice value
new_proc.p_nice = stoull(short_str);
new_proc.p_nice = stoll(short_str);
continue;
case 20: //? Number of threads
new_proc.threads = stoull(short_str);