summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-11-08 12:12:30 -0800
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-11-13 21:16:16 +0100
commitd505167d68e716c9833e70ae4a1ddf57a9bdbab2 (patch)
tree218513771d5554fb7054b7cafbb02aff2a556a21
parent652533e27d718366087792154e597a10ca9b54bb (diff)
ecore: correctly apply the offset on the upper part of the boolean mask for Efl.BooleanModel.
The upper mask is the one that should actually move as the gap is between the lower and the upper mask when removing an element from the array. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10632
-rw-r--r--src/lib/ecore/efl_boolean_model.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ecore/efl_boolean_model.c b/src/lib/ecore/efl_boolean_model.c
index 5ac0dca..552baf1 100644
--- a/src/lib/ecore/efl_boolean_model.c
+++ b/src/lib/ecore/efl_boolean_model.c
@@ -282,8 +282,8 @@ _child_removed(void *data, const Efl_Event *event)
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