From 4c1ec831747d5cf2401c07c00f3e052e53657117 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 28 Jun 2012 18:26:49 +0200 Subject: [PATCH] Fix "Using log-scaled graph with show_graph_scale causes segfault" (sf.net #3538674) bug reported by Nikslay --- src/conky.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conky.cc b/src/conky.cc index 1dcf9835..c3f607ea 100644 --- a/src/conky.cc +++ b/src/conky.cc @@ -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++]);