Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
dc050e80
Commit
dc050e80
authored
Mar 25, 2018
by
Hisham Muhammad
Browse files
Fix overflow for signals >= 100.
Thanks to @gzip4 for tracking this down. Closes #764.
parent
aa3dc634
Changes
1
Hide whitespace changes
Inline
Side-by-side
SignalsPanel.c
View file @
dc050e80
...
...
@@ -41,10 +41,10 @@ Panel* SignalsPanel_new() {
}
#if (defined(SIGRTMIN) && defined(SIGRTMAX))
if
(
SIGRTMAX
-
SIGRTMIN
<=
100
)
{
static
char
buf
[
1
5
];
static
char
buf
[
1
6
];
for
(
int
sig
=
SIGRTMIN
;
sig
<=
SIGRTMAX
;
i
++
,
sig
++
)
{
int
n
=
sig
-
SIGRTMIN
;
xSnprintf
(
buf
,
1
5
,
"%2d SIGRTMIN%-+3d"
,
sig
,
n
);
xSnprintf
(
buf
,
1
6
,
"%2d SIGRTMIN%-+3d"
,
sig
,
n
);
if
(
n
==
0
)
{
buf
[
11
]
=
'\0'
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment