ecl_equal: fix comparison of displaced bitvectors (this time for real)

The "fix" from commit d3420eb3d5 did
    not work properly for bitvectors with length > 8.

    Fixes #445
This commit is contained in:
Marius Gerbershagen 2018-12-23 13:37:23 +01:00
parent 317d8915cf
commit 1553f4e70e

View file

@ -378,8 +378,8 @@ ecl_equal(register cl_object x, cl_object y)
ox = x->vector.offset;
oy = y->vector.offset;
for (i = 0; i < x->vector.fillp; i++)
if(((x->vector.self.bit[(i+ox)/8] & (0200>>(i+ox)%8)) << ox)
!=((y->vector.self.bit[(i+oy)/8] & (0200>>(i+oy)%8)) << oy))
if(((x->vector.self.bit[(i+ox)/8] << (i+ox)%8) & 0200)
!= ((y->vector.self.bit[(i+oy)/8] << (i+oy)%8) & 0200))
return(FALSE);
return(TRUE);
}