mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-16 01:57:09 +00:00
Confirm that index is greater than 0
This commit is contained in:
parent
b97eff4dbe
commit
ddb70b4ba9
@ -525,7 +525,9 @@ void print_pid_thread_list(struct text_object *obj, char *p,
|
||||
}
|
||||
}
|
||||
closedir(dir);
|
||||
if (p[totallength - 1] == ',') { p[totallength - 1] = 0; }
|
||||
if (totallength > 0 && p[totallength - 1] == ',') {
|
||||
p[totallength - 1] = 0;
|
||||
}
|
||||
} else {
|
||||
p[0] = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user