diff --git a/Numeric/LFSR.hpp b/Numeric/LFSR.hpp index 04f4cc2fc..b45eba802 100644 --- a/Numeric/LFSR.hpp +++ b/Numeric/LFSR.hpp @@ -69,8 +69,8 @@ template > 1) ^ (result * polynomial); + const auto result = IntType(value_ & 1); + value_ = IntType((value_ >> 1) ^ (result * polynomial)); return result; }