From 90782d3c2748820bd8c6d4400ebf3b557ebe0ad3 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 26 Jun 2021 23:39:37 -0400 Subject: [PATCH] Corrects for IntType != int. --- Numeric/LFSR.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }