aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_main.c
diff options
context:
space:
mode:
authorBenjamin Jacobs <benj@spam.thsi.be>2016-06-06 16:33:54 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-06-06 16:34:05 -0700
commit32fd16dfc0fce3b736d3f959370859ba63cacbd5 (patch)
tree824f59b666abd2f4ff2f85a86597b66f553934d5 /src/lib/evas/canvas/evas_main.c
parentecore: make sure lifecycle of Efl.Loop.Fd is correct. (diff)
downloadefl-32fd16dfc0fce3b736d3f959370859ba63cacbd5.tar.gz
evas: button_mask as unsigned, UB fixes.
Summary: * pointer.button is DATA32 which is unsigned, so this changes the definition of pointer_button_down_mask accordingly. * Avoids UB in mask generation: lib/evas/canvas/evas_events.c:1348:37: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4019 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/evas/canvas/evas_main.c')
-rw-r--r--src/lib/evas/canvas/evas_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 844b3364d6..516c418d86 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -559,10 +559,10 @@ _evas_canvas_pointer_canvas_xy_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Ev
if (y) *y = e->pointer.y;
}
-EOLIAN static int
+EOLIAN static unsigned int
_evas_canvas_pointer_button_down_mask_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
{
- return (int)e->pointer.button;
+ return e->pointer.button;
}
EOLIAN static Eina_Bool