aboutsummaryrefslogtreecommitdiff
path: root/src/bech32.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-02-21 09:27:09 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-02-25 09:43:54 +0100
commitaaaa4dbab4ec06d69645de919810ccd0da836a0e (patch)
treece7cc9670d6009063845aee61cc7f41f640d1ecb /src/bech32.cpp
parentfae6b26758fff0dd52a9f4f37bb8325907a48589 (diff)
Avoid implicit-integer-sign-change in bech32.cpp
Diffstat (limited to 'src/bech32.cpp')
-rw-r--r--src/bech32.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bech32.cpp b/src/bech32.cpp
index 3cda1dfff5..dce9b2e4cc 100644
--- a/src/bech32.cpp
+++ b/src/bech32.cpp
@@ -284,10 +284,11 @@ inline unsigned char LowerCase(unsigned char c)
}
/** Return indices of invalid characters in a Bech32 string. */
-bool CheckCharacters(const std::string& str, std::vector<int>& errors) {
+bool CheckCharacters(const std::string& str, std::vector<int>& errors)
+{
bool lower = false, upper = false;
for (size_t i = 0; i < str.size(); ++i) {
- unsigned char c = str[i];
+ unsigned char c{(unsigned char)(str[i])};
if (c >= 'a' && c <= 'z') {
if (upper) {
errors.push_back(i);