Eo: Fix class checking.

Without this patch, NULL, and random garbage are detected as classes.
This fixes is.
This commit is contained in:
Tom Hacohen 2014-04-14 10:34:57 +01:00
parent df6ef6aa78
commit 68a1f1941a
1 changed files with 2 additions and 1 deletions

View File

@ -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 *