Skip to content

Commit

Permalink
Fixed: Process nice value underflowing, issue #461
Browse files Browse the repository at this point in the history
  • Loading branch information
aristocratos committed Nov 6, 2022
1 parent c522066 commit 5a53fb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/btop_shared.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/linux/btop_collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5a53fb4

Please sign in to comment.