[gimp] Avoid overflow in expression



commit fee8f4008ec253ff30251737560129fcbd34bfa1
Author: Mukund Sivaraman <muks banu com>
Date:   Thu Sep 30 12:46:22 2010 +0530

    Avoid overflow in expression

 app/display/gimpdisplayshell-title.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-title.c b/app/display/gimpdisplayshell-title.c
index 2ef9504..6b43fe7 100644
--- a/app/display/gimpdisplayshell-title.c
+++ b/app/display/gimpdisplayshell-title.c
@@ -323,12 +323,10 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
               break;
 
             case 'M': /* image size in megapixels */
-              {
-                i += print (title, title_len, i, "%.1f",
-                            gimp_image_get_width (image) *
-                            gimp_image_get_height (image) /
-                            1000000.0f);
-              }
+	      i += print (title, title_len, i, "%.1f",
+			  (double) gimp_image_get_width (image) *
+			  gimp_image_get_height (image) /
+			  1000000.0);
               break;
 
             case 'l': /* number of layers */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]