tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=68a1f1941acdbde01a06983b7cb46624a2578abb

commit 68a1f1941acdbde01a06983b7cb46624a2578abb
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Apr 14 10:34:57 2014 +0100

    Eo: Fix class checking.
    
    Without this patch, NULL, and random garbage are detected as classes.
    This fixes is.
---
 src/lib/eo/eo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index d207f20..a6c356a 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -147,7 +147,8 @@ _eo_is_a_class(const Eo *eo_id)
    if (!eo_id) return EINA_FALSE;
    oid = ((Eo_Base *) eo_id)->id;
 #endif
-   return (((oid >> REF_TAG_SHIFT) & 0x1) == 0x0);
+   return ((((oid >> REF_TAG_SHIFT) & 0x1) == 0x0) &&
+         (oid & MASK_CLASS_TAG));
 }
 
 static inline _Eo_Class *

-- 


Reply via email to