summaryrefslogtreecommitdiff
path: root/src/load-graph.cpp
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-19 01:13:04 +0100
committerinfirit <[email protected]>2014-12-19 01:13:04 +0100
commiteb569602a5a7bafde83f2cb5cad84d38dac0377c (patch)
treece7d035cd719893108a0b8de00f705772d3bb449 /src/load-graph.cpp
parente55735b613afe7af55a4e25fa92aadf9fb804294 (diff)
downloadmate-system-monitor-eb569602a5a7bafde83f2cb5cad84d38dac0377c.tar.bz2
mate-system-monitor-eb569602a5a7bafde83f2cb5cad84d38dac0377c.tar.xz
Fixed unsigned overflow error (use guint64 instead of unsigned).
Taken from GSM commit: 74ba377a5a7d4787595e1b46c1e880426584a2fd From: Robert Roth <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=681553
Diffstat (limited to 'src/load-graph.cpp')
-rw-r--r--src/load-graph.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/load-graph.cpp b/src/load-graph.cpp
index 15c132e..def0381 100644
--- a/src/load-graph.cpp
+++ b/src/load-graph.cpp
@@ -132,7 +132,7 @@ static void draw_background(LoadGraph *graph) {
gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]);
if (graph->type == LOAD_GRAPH_NET) {
// operation orders matters so it's 0 if i == num_bars
- unsigned rate = graph->net.max - (i * graph->net.max / num_bars);
+ guint64 rate = graph->net.max - (i * graph->net.max / num_bars);
const std::string caption(procman::format_network_rate(rate, graph->net.max));
pango_layout_set_text (layout, caption.c_str(), -1);
pango_layout_get_extents (layout, NULL, &extents);