mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Avoid implicit-integer-sign-change in bech32.cpp
This commit is contained in:
parent
fae6b26758
commit
aaaa4dbab4
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -53,7 +53,6 @@ unsigned-integer-overflow:policy/fees.cpp
|
|||
unsigned-integer-overflow:prevector.h
|
||||
unsigned-integer-overflow:script/interpreter.cpp
|
||||
unsigned-integer-overflow:txmempool.cpp
|
||||
implicit-integer-sign-change:bech32.cpp
|
||||
implicit-integer-sign-change:compat/stdin.cpp
|
||||
implicit-integer-sign-change:compressor.h
|
||||
implicit-integer-sign-change:crypto/
|
||||
|
|
Loading…
Add table
Reference in a new issue