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
dd175b68
Commit
dd175b68
authored
Mar 25, 2018
by
Hisham Muhammad
Browse files
Fix overflow for signals >= 100.
Thanks to @gzip4 for tracking this down. Closes #764.
parent
7ad9701a
Changes
1
Show whitespace changes
Inline
Side-by-side
SignalsPanel.c
View file @
dd175b68
...
@@ -41,10 +41,10 @@ Panel* SignalsPanel_new() {
...
@@ -41,10 +41,10 @@ Panel* SignalsPanel_new() {
}
}
#if (defined(SIGRTMIN) && defined(SIGRTMAX))
#if (defined(SIGRTMIN) && defined(SIGRTMAX))
if
(
SIGRTMAX
-
SIGRTMIN
<=
100
)
{
if
(
SIGRTMAX
-
SIGRTMIN
<=
100
)
{
static
char
buf
[
1
5
];
static
char
buf
[
1
6
];
for
(
int
sig
=
SIGRTMIN
;
sig
<=
SIGRTMAX
;
i
++
,
sig
++
)
{
for
(
int
sig
=
SIGRTMIN
;
sig
<=
SIGRTMAX
;
i
++
,
sig
++
)
{
int
n
=
sig
-
SIGRTMIN
;
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
)
{
if
(
n
==
0
)
{
buf
[
11
]
=
'\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