From 78aa41ac5ea98f715f046a869f4faae3d13e726d Mon Sep 17 00:00:00 2001 From: Josh Elsasser Date: Thu, 9 Feb 2006 18:16:36 +0000 Subject: [PATCH] Fix ratio calculation to not truncate to a whole number. --- gtk/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/util.c b/gtk/util.c index 36717804f..b2423cb64 100644 --- a/gtk/util.c +++ b/gtk/util.c @@ -90,7 +90,7 @@ ratiostr(guint64 down, guint64 up) { /* this is a UTF-8 infinity symbol */ return g_strdup(_("\xE2\x88\x9E")); - ratio = up / down; + ratio = (double)up / (double)down; return g_strdup_printf("%.*f", (10.0 > ratio ? 2 : (100.0 > ratio ? 1 : 0)), ratio);