mike-matera / ArduinoSTL

An STL and iostream implementation based on uClibc++ that supports my CS-11M class.
GNU General Public License v3.0
325 stars 80 forks source link

Fix bitset copy assignment operator to not run off end of array. #49

Closed dewhisna closed 2 years ago

dewhisna commented 4 years ago

If using a bitset with an even number of bytes, for example bitset<16>, the original code tried to copy 3 bytes instead of 2 and would run off the end of the array.

mike-matera commented 2 years ago

Hello! Thanks for this PR. Nice catch!