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
// Manually shift all the byte in the buffer
while (offset < byte_length)
{
- lookup->buffer[offset] = (lookup->buffer[offset] & upper_mask) |
- ((lookup->buffer[offset] & lower_mask) << 1);
+ lookup->buffer[offset] = ((lookup->buffer[offset] & upper_mask) >> 1) |
+ (lookup->buffer[offset] & lower_mask);
if (offset + 1 < byte_length)
lookup->buffer[offset] |= lookup->buffer[offset + 1] & 0x1;