summaryrefslogtreecommitdiff
path: root/src/lib/ecore/efl_boolean_model.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore/efl_boolean_model.c')
-rw-r--r--src/lib/ecore/efl_boolean_model.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/ecore/efl_boolean_model.c b/src/lib/ecore/efl_boolean_model.c
index 3eaad88..552baf1 100644
--- a/src/lib/ecore/efl_boolean_model.c
+++ b/src/lib/ecore/efl_boolean_model.c
@@ -258,11 +258,11 @@ _child_removed(void *data, const Efl_Event *event)
258 Eina_Iterator *it; 258 Eina_Iterator *it;
259 Eina_Array updated; 259 Eina_Array updated;
260 260
261 if (!pd->parent) return; 261 if (!pd->values) return;
262 262
263 eina_array_step_set(&updated, sizeof (Eina_Array), 8); 263 eina_array_step_set(&updated, sizeof (Eina_Array), 8);
264 264
265 it = eina_hash_iterator_data_new(pd->parent->values); 265 it = eina_hash_iterator_data_new(pd->values);
266 EINA_ITERATOR_FOREACH(it, v) 266 EINA_ITERATOR_FOREACH(it, v)
267 { 267 {
268 Efl_Boolean_Model_Storage_Range *lookup; 268 Efl_Boolean_Model_Storage_Range *lookup;
@@ -276,14 +276,14 @@ _child_removed(void *data, const Efl_Event *event)
276 { 276 {
277 unsigned char lower_mask = (((unsigned char)1) << (ev->index & 0x7)) - 1; 277 unsigned char lower_mask = (((unsigned char)1) << (ev->index & 0x7)) - 1;
278 unsigned char upper_mask = (~(((unsigned char)1) << (ev->index & 0x7))) & (~lower_mask); 278 unsigned char upper_mask = (~(((unsigned char)1) << (ev->index & 0x7))) & (~lower_mask);
279 unsigned char offset = (ev->index - lookup->offset) >> 3; 279 uint16_t offset = (ev->index - lookup->offset) >> 3;
280 uint16_t byte_length = lookup->length >> 3; 280 uint16_t byte_length = lookup->length >> 3;
281 281
282 // Manually shift all the byte in the buffer 282 // Manually shift all the byte in the buffer
283 while (offset < byte_length) 283 while (offset < byte_length)
284 { 284 {
285 lookup->buffer[offset] = (lookup->buffer[offset] & upper_mask) | 285 lookup->buffer[offset] = ((lookup->buffer[offset] & upper_mask) >> 1) |
286 ((lookup->buffer[offset] & lower_mask) << 1); 286 (lookup->buffer[offset] & lower_mask);
287 if (offset + 1 < byte_length) 287 if (offset + 1 < byte_length)
288 lookup->buffer[offset] |= lookup->buffer[offset + 1] & 0x1; 288 lookup->buffer[offset] |= lookup->buffer[offset + 1] & 0x1;
289 289