diff --git a/binary.h b/binary.h index 81a21a67..0d718583 100644 --- a/binary.h +++ b/binary.h @@ -67,7 +67,7 @@ namespace etl template const typename max_value_for_nbits_helper::value_type max_value_for_nbits_helper::value; } - + /// Definition for non-zero NBITS. template struct max_value_for_nbits @@ -490,7 +490,7 @@ namespace etl } // Fold the remaining bits. - folded_value ^= value; + folded_value ^= value & mask; return folded_value; }