From e46c0812fcfe5f6c809aff3bf88fccd5a9012810 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 14 Jul 2015 15:10:38 -0400 Subject: [PATCH] e-comp-wl: Fix getting end key during key down/up events NB: This is actually an Oopsie from a previous commit that should not have gotten in. Signed-off-by: Chris Michael --- src/bin/e_comp_wl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index ac69028..753d0b0 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -863,7 +863,7 @@ _e_comp_wl_cb_key_down(void *event) exit(0); #endif - end = (uint32_t *)cdata->kbd.keys.data + cdata->kbd.keys.size; + end = (uint32_t *)cdata->kbd.keys.data + (cdata->kbd.keys.size / sizeof(*k)); for (k = cdata->kbd.keys.data; k < end; k++) { @@ -920,7 +920,7 @@ _e_comp_wl_cb_key_up(void *event) keycode = (ev->keycode - 8); if (!(cdata = e_comp->wl_comp_data)) return; - end = (uint32_t *)cdata->kbd.keys.data + cdata->kbd.keys.size; + end = (uint32_t *)cdata->kbd.keys.data + (cdata->kbd.keys.size / sizeof(*k)); for (k = cdata->kbd.keys.data; k < end; k++) if (*k == keycode) *k = *--end; -- 2.7.4