discomfitor pushed a commit to branch enlightenment-0.22.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=deb08178d7cab4301835e5a3bfa942b66431400d

commit deb08178d7cab4301835e5a3bfa942b66431400d
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Wed Apr 11 14:41:01 2018 +0900

    e pan/scrollframe - fix garbage pan values that happen temporarily
    
    during setup garbage pan positions can be set due to uninitialized
    local variables. fix that to initialize.
    
    @fix
---
 src/bin/e_pan.c         | 6 +++++-
 src/bin/e_scrollframe.c | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_pan.c b/src/bin/e_pan.c
index ac894a3c3..5000939bd 100644
--- a/src/bin/e_pan.c
+++ b/src/bin/e_pan.c
@@ -144,7 +144,7 @@ static void
 _e_smart_child_resize_hook(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED)
 {
    E_Smart_Data *sd;
-   Evas_Coord w, h;
+   Evas_Coord w = 0, h = 0;
 
    sd = data;
    if (!sd->child_obj) return;
@@ -173,10 +173,14 @@ _e_smart_add(Evas_Object *obj)
    sd = E_NEW(E_Smart_Data, 1);
    if (!sd) return;
    sd->smart_obj = obj;
+   sd->px = 0;
+   sd->py = 0;
    sd->x = 0;
    sd->y = 0;
    sd->w = 0;
    sd->h = 0;
+   sd->child_w = 0;
+   sd->child_h = 0;
    evas_object_smart_data_set(obj, sd);
 }
 
diff --git a/src/bin/e_scrollframe.c b/src/bin/e_scrollframe.c
index 450d46a23..7201aecd2 100644
--- a/src/bin/e_scrollframe.c
+++ b/src/bin/e_scrollframe.c
@@ -733,7 +733,7 @@ static void
 _e_smart_scrollbar_read(E_Smart_Data *sd)
 {
    Evas_Coord x, y, mx = 0, my = 0;
-   double vx, vy;
+   double vx = 0.0, vy = 0.0;
 
    edje_object_part_drag_value_get(sd->edje_obj, "e.dragable.vbar", NULL, &vy);
    edje_object_part_drag_value_get(sd->edje_obj, "e.dragable.hbar", &vx, NULL);
@@ -915,7 +915,7 @@ _e_smart_scrollbar_size_adjust(E_Smart_Data *sd)
    if ((sd->child_obj) || (sd->extern_pan))
      {
         Evas_Coord x = 0, y = 0, w = 0, h = 0, mx = 0, my = 0, vw = 0, vh = 0;
-        double vx, vy, size;
+        double vx = 0.0, vy = 0.0, size = 0.0;
 
         edje_object_calc_force(sd->edje_obj);
         edje_object_part_geometry_get(sd->edje_obj, "e.swallow.content",

-- 


Reply via email to