[gimp] app, pdb: fix bug in recent gimp-drawable-threshold change



commit c767179ced3a5528cc0278bcde778b33ff2d21a7
Author: Michael Natterer <mitch gimp org>
Date:   Mon Nov 7 20:27:36 2016 +0100

    app, pdb: fix bug in recent gimp-drawable-threshold change
    
    Actually use the passed ranges again, instead of using uninitialized
    local variables.

 app/pdb/drawable-color-cmds.c       |    4 ++--
 tools/pdbgen/pdb/drawable_color.pdb |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/pdb/drawable-color-cmds.c b/app/pdb/drawable-color-cmds.c
index d0011d7..ffc70f2 100644
--- a/app/pdb/drawable-color-cmds.c
+++ b/app/pdb/drawable-color-cmds.c
@@ -410,8 +410,8 @@ drawable_histogram_invoker (GimpProcedure         *procedure,
 
           n_bins = gimp_histogram_n_bins (histogram);
 
-          start = ROUND ((gdouble) start * (n_bins - 1));
-          end   = ROUND ((gdouble) end   * (n_bins - 1));
+          start = ROUND (start_range * (n_bins - 1));
+          end   = ROUND (end_range   * (n_bins - 1));
 
           mean       = gimp_histogram_get_mean (histogram, channel,
                                                  start, end);
diff --git a/tools/pdbgen/pdb/drawable_color.pdb b/tools/pdbgen/pdb/drawable_color.pdb
index 960289d..2d58173 100644
--- a/tools/pdbgen/pdb/drawable_color.pdb
+++ b/tools/pdbgen/pdb/drawable_color.pdb
@@ -456,8 +456,8 @@ HELP
 
       n_bins = gimp_histogram_n_bins (histogram);
 
-      start = ROUND ((gdouble) start * (n_bins - 1));
-      end   = ROUND ((gdouble) end   * (n_bins - 1));
+      start = ROUND (start_range * (n_bins - 1));
+      end   = ROUND (end_range   * (n_bins - 1));
 
       mean       = gimp_histogram_get_mean (histogram, channel,
                                            start, end);


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