From 5007c13fbd585628d10e2a92b7e96702d66defcc Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 21 Nov 2017 04:55:41 -0500 Subject: [PATCH] Switch to size_t for loop control --- speck.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/speck.cpp b/speck.cpp index a8d55fa9..b6eea409 100644 --- a/speck.cpp +++ b/speck.cpp @@ -57,7 +57,7 @@ inline void SPECK_Encrypt(W c[2], const W p[2], const W k[R]) c[0]=p[0]; c[1]=p[1]; // Don't unroll this loop. Things slow down. - for(W i=0; static_cast(i)(i)(i)>=0; --i) + for (size_t i=R-1; static_cast(i)>=0; --i) TR83(p[0], p[1], k[i]); }