From 5b8421c550da369162e23df70c4b62a77358ffc8 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Thu, 4 May 2017 20:22:06 +0200 Subject: [PATCH] eo: fix missing event emission There have been cases where the logic of _event_callback_call break'ed too early in the event submission. Reason for that was the line ((const unsigned char *) desc - (const unsigned char *) it->desc) producing a overflow. This means the if statement if (!legacy_compare && ((const unsigned char *) desc - (const unsigned char *) it->desc) < 0) was true while the pointer desc was smaller than it->desc, which means the event subscription got aborted, even if it should not. This turned out on two 32 bit maschines. And led to not rendering apps anymore. It was introduced by commit in 605fec91ee7. @fix --- src/lib/eo/eo_base_class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index 18c25bf..6d05aed 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -1460,7 +1460,7 @@ restart_back: { // Array callbacks are sorted, break if we are getting to high. if (!legacy_compare && - ((const unsigned char *) desc - (const unsigned char *) it->desc) < 0) + ((const unsigned char *) desc < (const unsigned char *) it->desc)) break; if (!_cb_desc_match(it->desc, desc, legacy_compare)) continue; -- 2.7.4