From 04daff59de68e69ddbed2568764a99dc082835fc Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 17 Apr 2008 02:29:43 +0000 Subject: [PATCH] Oh, what the heck, go for it - do the size calculations in 64 bits, just in case a file has more than 2^32 megabytes of data :-); we already require 64-bit support for calculations and formatting. svn path=/trunk/; revision=25088 --- gtk/main_welcome.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/main_welcome.c b/gtk/main_welcome.c index 9d82dc1fc9..3cb3cb9790 100644 --- a/gtk/main_welcome.c +++ b/gtk/main_welcome.c @@ -275,11 +275,11 @@ welcome_filename_link_new(const gchar *filename, GtkWidget **label) err = eth_stat(filename, &stat_buf); if(err == 0) { if (stat_buf.st_size/1024/1024 > 10) { - g_string_append_printf(str, " %dMB", (int) (stat_buf.st_size/1024/1024)); + g_string_append_printf(str, " %" G_GINT64_MODIFIER "dMB", (gint64) (stat_buf.st_size/1024/1024)); } else if (stat_buf.st_size/1024 > 10) { - g_string_append_printf(str, " %dKB", (int) (stat_buf.st_size/1024)); + g_string_append_printf(str, " %" G_GINT64_MODIFIER "dKB", (gint64) (stat_buf.st_size/1024)); } else { - g_string_append_printf(str, " %dBytes", (int) (stat_buf.st_size)); + g_string_append_printf(str, " %" G_GINT64_MODIFIER "dBytes", (gint64) (stat_buf.st_size)); } } else { g_string_append(str, " (not found)");