mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-28 17:48:39 +00:00
Fix "Using log-scaled graph with show_graph_scale causes segfault" (sf.net #3538674)
bug reported by Nikslay
This commit is contained in:
parent
6b0d6a9f32
commit
4c1ec83174
@ -1604,7 +1604,7 @@ int draw_each_line_inner(char *s, int special_index, int last_special_applied)
|
|||||||
set_foreground_color(tmpcolour[
|
set_foreground_color(tmpcolour[
|
||||||
(int)((float)(w - 2) -
|
(int)((float)(w - 2) -
|
||||||
current->graph[j] * (w - 2) /
|
current->graph[j] * (w - 2) /
|
||||||
(float)current->scale)
|
std::max((float)current->scale, 1.0f))
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
set_foreground_color(tmpcolour[colour_idx++]);
|
set_foreground_color(tmpcolour[colour_idx++]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user