aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/newhope
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-12-06 11:05:52 -0500
committerJack Lloyd <[email protected]>2019-12-06 11:11:56 -0500
commit5a25378f8a78968b0027f633980ca1eb43d8213c (patch)
treecc7c2b5208ec9160e660c8a14212e95fea42ed5d /src/lib/pubkey/newhope
parent125515c43410a902adca5a1b6a8aab4f424dcce1 (diff)
Fix MSVC warning in Newhope
Diffstat (limited to 'src/lib/pubkey/newhope')
-rw-r--r--src/lib/pubkey/newhope/newhope.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pubkey/newhope/newhope.cpp b/src/lib/pubkey/newhope/newhope.cpp
index a6fbc7cdc..3a5069636 100644
--- a/src/lib/pubkey/newhope/newhope.cpp
+++ b/src/lib/pubkey/newhope/newhope.cpp
@@ -45,7 +45,7 @@ inline uint16_t barrett_reduce(uint16_t a)
{
uint32_t u = (static_cast<uint32_t>(a) * 5) >> 16;
u *= PARAM_Q;
- a -= u;
+ a = static_cast<uint16_t>(a - u);
return a;
}