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
807df036
Commit
807df036
authored
Nov 26, 2007
by
Hisham Muhammad
Browse files
Avoid crashing when using many meters (thanks to David Cho for the report)
parent
bd0f30dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
807df036
What's new in version 0.7.1
* BUGFIX: avoid crashing when using many meters
(thanks to David Cho for the report)
What's new in version 0.7
What's new in version 0.7
* CPU affinity configuration ('a' key)
* CPU affinity configuration ('a' key)
...
...
Header.c
View file @
807df036
...
@@ -73,6 +73,8 @@ void Header_setMode(Header* this, int i, MeterModeId mode, HeaderSide side) {
...
@@ -73,6 +73,8 @@ void Header_setMode(Header* this, int i, MeterModeId mode, HeaderSide side) {
?
this
->
leftMeters
?
this
->
leftMeters
:
this
->
rightMeters
;
:
this
->
rightMeters
;
if
(
i
>=
Vector_size
(
meters
))
return
;
Meter
*
meter
=
(
Meter
*
)
Vector_get
(
meters
,
i
);
Meter
*
meter
=
(
Meter
*
)
Vector_get
(
meters
,
i
);
Meter_setMode
(
meter
,
mode
);
Meter_setMode
(
meter
,
mode
);
}
}
...
...
Settings.c
View file @
807df036
...
@@ -96,7 +96,7 @@ bool Settings_read(Settings* this, char* fileName) {
...
@@ -96,7 +96,7 @@ bool Settings_read(Settings* this, char* fileName) {
if
(
fd
==
NULL
)
{
if
(
fd
==
NULL
)
{
return
false
;
return
false
;
}
}
const
int
maxLine
=
512
;
const
int
maxLine
=
65535
;
char
buffer
[
maxLine
];
char
buffer
[
maxLine
];
bool
readMeters
=
false
;
bool
readMeters
=
false
;
while
(
!
feof
(
fd
))
{
while
(
!
feof
(
fd
))
{
...
...
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