marc-mabe / php-enum

Simple and fast implementation of enumerations with native PHP
BSD 3-Clause "New" or "Revised" License
464 stars 36 forks source link

EnumSet::setBinaryBitset*(): out-of-range bits of last byte not truncated #71

Closed marc-mabe closed 8 years ago

marc-mabe commented 8 years ago

On setting a bitset from outside the setter method will truncate the given bitset to the same byte size as needed by the current enumeration but it does not truncate left over bits.

This bug exists in versions from 2.1.0 to 2.2.1 and in current master.