eo: Fix bad addressing in _eo_classes array

The header.id was masked before using it as index in the _eo_classes
array and was not unmasked when used.
It hasn't caused segfault (by sheer luck) but was wrong.

@fix
This commit is contained in:
Avi Levin 2015-01-08 14:40:56 +02:00 committed by Tom Hacohen
parent 10582235c5
commit b384cd3f62
1 changed files with 1 additions and 1 deletions

View File

@ -1446,7 +1446,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
memset(tmp, 0, arrsize);
_eo_classes = tmp;
_eo_classes[klass->header.id - 1] = klass;
_eo_classes[_UNMASK_ID(klass->header.id) - 1] = klass;
}
eina_spinlock_release(&_eo_class_creation_lock);