aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-04-15 12:22:30 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2012-04-15 13:40:14 +0200
commit8add7822cef7d39cb761f59e6b837159a4968982 (patch)
tree4553d1c473be24d8c4bdc5c3031799f181091bb2 /src/util.cpp
parent1f29d399f449af918189f0d8a0302a74286dc6b7 (diff)
downloadbitcoin-8add7822cef7d39cb761f59e6b837159a4968982.tar.xz
fix warnings: array subscript is of type 'char' [-Wchar-subscripts]
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 1eda59bafe..a5427c061b 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -636,7 +636,7 @@ vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid)
while (1)
{
- int dec = decode64_table[*p];
+ int dec = decode64_table[(unsigned char)*p];
if (dec == -1) break;
p++;
switch (mode)
@@ -676,12 +676,12 @@ vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid)
break;
case 2: // 4n+2 base64 characters processed: require '=='
- if (left || p[0] != '=' || p[1] != '=' || decode64_table[p[2]] != -1)
+ if (left || p[0] != '=' || p[1] != '=' || decode64_table[(unsigned char)p[2]] != -1)
*pfInvalid = true;
break;
case 3: // 4n+3 base64 characters processed: require '='
- if (left || p[0] != '=' || decode64_table[p[1]] != -1)
+ if (left || p[0] != '=' || decode64_table[(unsigned char)p[1]] != -1)
*pfInvalid = true;
break;
}