mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Fix overflow for signals >= 100.
Thanks to @gzip4 for tracking this down. Closes #764.
This commit is contained in:
parent
aa3dc634dc
commit
dc050e8088
@ -41,10 +41,10 @@ Panel* SignalsPanel_new() {
|
||||
}
|
||||
#if (defined(SIGRTMIN) && defined(SIGRTMAX))
|
||||
if (SIGRTMAX - SIGRTMIN <= 100) {
|
||||
static char buf[15];
|
||||
static char buf[16];
|
||||
for (int sig = SIGRTMIN; sig <= SIGRTMAX; i++, sig++) {
|
||||
int n = sig - SIGRTMIN;
|
||||
xSnprintf(buf, 15, "%2d SIGRTMIN%-+3d", sig, n);
|
||||
xSnprintf(buf, 16, "%2d SIGRTMIN%-+3d", sig, n);
|
||||
if (n == 0) {
|
||||
buf[11] = '\0';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user