diff --git a/AUTHORS b/AUTHORS index 172d9ce1..5c5fe396 100644 --- a/AUTHORS +++ b/AUTHORS @@ -101,6 +101,9 @@ Lucas Brutschy Moncelier Camille METAR patch +Nattfodd + Fixed top_mem dupes + nathanj439 MPD time fix diff --git a/src/top.c b/src/top.c index 5fe36849..af87e222 100644 --- a/src/top.c +++ b/src/top.c @@ -477,6 +477,7 @@ inline void process_find_top(struct process **cpu, struct process **mem) sizeof(struct process) * sorttmp_size); } qsort(sorttmp, i, sizeof(struct process *), comparemem); + sorttmp_size = i; for (i = 0, j = 0; i < sorttmp_size && j < 10; i++) { if (j == 0 || sorttmp[i]->totalmem != mem[j-1]->totalmem || strncmp(sorttmp[i]->name, mem[j-1]->name,128)) {