1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 21:49:07 +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:
Pavel Labath 2012-06-28 18:26:49 +02:00
parent 6b0d6a9f32
commit 4c1ec83174

View File

@ -1604,7 +1604,7 @@ int draw_each_line_inner(char *s, int special_index, int last_special_applied)
set_foreground_color(tmpcolour[
(int)((float)(w - 2) -
current->graph[j] * (w - 2) /
(float)current->scale)
std::max((float)current->scale, 1.0f))
]);
} else {
set_foreground_color(tmpcolour[colour_idx++]);