aboutsummaryrefslogtreecommitdiff
path: root/src/util/strencodings.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-12-13 10:04:50 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-13 09:57:33 +0100
commitfad6761cf7875c7e91fd76398a71a9f9c6b3ea82 (patch)
treeb008f9daeebbf11bf1b23aeeda83085adb70265d /src/util/strencodings.h
parenteb63b8fab91c3aec46ef4ae66e6241ed5de49bbd (diff)
Fix implicit integer sign changes in strencodings
Diffstat (limited to 'src/util/strencodings.h')
-rw-r--r--src/util/strencodings.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/strencodings.h b/src/util/strencodings.h
index 08a5465de1..5813e8d212 100644
--- a/src/util/strencodings.h
+++ b/src/util/strencodings.h
@@ -226,7 +226,7 @@ bool TimingResistantEqual(const T& a, const T& b)
if (b.size() == 0) return a.size() == 0;
size_t accumulator = a.size() ^ b.size();
for (size_t i = 0; i < a.size(); i++)
- accumulator |= a[i] ^ b[i%b.size()];
+ accumulator |= size_t(a[i] ^ b[i%b.size()]);
return accumulator == 0;
}