Commit 5c5390f7 authored by Philip Withnall's avatar Philip Withnall

gtkthemingengine: Fix a definite use of an uninitialised variable

At this point, segments[1] is always uninitialised, and is used to
initialise itself. Looking at the code in the branch above, this appears
to have been a typo from segments[0], as segments[1] seems to typically
be 2 * segments[0].

Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
parent 99a162c6
......@@ -1478,7 +1478,7 @@ set_stroke_style (cairo_t *cr,
n = round ((1. / 3) * n);
segments[0] = n ? (1. / 3) * length / n : 1;
segments[1] = 2 * segments[1];
segments[1] = 2 * segments[0];
}
cairo_set_dash (cr, segments, G_N_ELEMENTS (segments), 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment