1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 21:49:07 +00:00

Fix a segfault in graph drawing code (sf.net #3537523)

PS: boy, is that code messy or what

bug reported by b3niup
This commit is contained in:
Pavel Labath 2012-06-26 22:43:12 +02:00
parent b5dc59e9b2
commit 6b0d6a9f32

View File

@ -1552,7 +1552,7 @@ int draw_each_line_inner(char *s, int special_index, int last_special_applied)
w = current->width;
if (w == 0) {
w = text_start_x + text_width - cur_x - 1;
current->graph_width = w - 1;
current->graph_width = MAX(w - 1, 0);
if (current->graph_width != current->graph_allocated) {
w = current->graph_allocated + 1;
}