aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-05-20 01:31:29 +0800
committerChristian Persch <chpe@src.gnome.org>2004-05-20 01:31:29 +0800
commit703d9f871457baf5eec89dc550ebed4a331d3213 (patch)
tree2bed5a2ea30a23ff63cbdeed8f167d4f3fbc51c2
parent00a146e1e4096898e122f2e965d908c92221d874 (diff)
downloadgsoc2013-epiphany-703d9f871457baf5eec89dc550ebed4a331d3213.tar
gsoc2013-epiphany-703d9f871457baf5eec89dc550ebed4a331d3213.tar.gz
gsoc2013-epiphany-703d9f871457baf5eec89dc550ebed4a331d3213.tar.bz2
gsoc2013-epiphany-703d9f871457baf5eec89dc550ebed4a331d3213.tar.lz
gsoc2013-epiphany-703d9f871457baf5eec89dc550ebed4a331d3213.tar.xz
gsoc2013-epiphany-703d9f871457baf5eec89dc550ebed4a331d3213.tar.zst
gsoc2013-epiphany-703d9f871457baf5eec89dc550ebed4a331d3213.zip
Fix overflow.
2004-05-19 Christian Persch <chpe@cvs.gnome.org> * lib/widgets/ephy-cell-renderer-progress.c: (ephy_cell_renderer_progress_render): Fix overflow.
-rw-r--r--ChangeLog7
-rw-r--r--lib/widgets/ephy-cell-renderer-progress.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a1dcb6b09..7f4d132ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2004-05-19 Christian Persch <chpe@cvs.gnome.org>
+ * lib/widgets/ephy-cell-renderer-progress.c:
+ (ephy_cell_renderer_progress_render):
+
+ Fix overflow.
+
+2004-05-19 Christian Persch <chpe@cvs.gnome.org>
+
* configure.in:
* embed/mozilla/GtkNSSClientAuthDialogs.cpp:
* embed/mozilla/GtkNSSDialogs.cpp:
diff --git a/lib/widgets/ephy-cell-renderer-progress.c b/lib/widgets/ephy-cell-renderer-progress.c
index 771875b7b..ff8348bc0 100644
--- a/lib/widgets/ephy-cell-renderer-progress.c
+++ b/lib/widgets/ephy-cell-renderer-progress.c
@@ -245,7 +245,7 @@ ephy_cell_renderer_progress_render (GtkCellRenderer *cell,
gdk_draw_rectangle (window, gc, TRUE, x, y, w, h);
gdk_gc_set_rgb_fg_color (gc, &widget->style->bg[GTK_STATE_SELECTED]);
- perc_w = w * cellprogress->priv->value / 100;
+ perc_w = w * MAX (0, cellprogress->priv->value) / 100;
gdk_draw_rectangle (window, gc, TRUE, x, y, perc_w, h);
layout = gtk_widget_create_pango_layout (widget, cellprogress->priv->text);