From b46357da05a09ecf269bede5906afc170688ef4c Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Fri, 11 Dec 2015 18:59:55 +0000 Subject: [PATCH] Added mask to final result of fold_bits() --- binary.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }