aboutsummaryrefslogtreecommitdiffstats
path: root/staging_vespalib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2021-04-28 18:38:24 +0200
committerTor Egge <Tor.Egge@online.no>2021-04-28 18:38:24 +0200
commit4dd50f29a422d4e7db6b672257da73f5721a2a6f (patch)
treee000d00cab9660c6e4bbe77a26c75b2baf4b0239 /staging_vespalib
parented3ee78f61366ecb01c3143f78cc89a478e2549e (diff)
Use signed char when needed for base64 encoding.
Diffstat (limited to 'staging_vespalib')
-rw-r--r--staging_vespalib/src/vespa/vespalib/encoding/base64.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/encoding/base64.cpp b/staging_vespalib/src/vespa/vespalib/encoding/base64.cpp
index c0b767c33a1..5dfe9d27839 100644
--- a/staging_vespalib/src/vespa/vespalib/encoding/base64.cpp
+++ b/staging_vespalib/src/vespa/vespalib/encoding/base64.cpp
@@ -19,7 +19,7 @@ static const char base64Chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
// Set -1 for illegal chars that will cause an error.
// Set -2 for illegal chars that will be ignored. (whitespace " \r\t\f\n")
-static const char base64Backwards[] = {
+static const signed char base64Backwards[] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -1, -2, -2, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
@@ -119,7 +119,7 @@ Base64::decode(const char* inBuffer, int inLen, char* outBuffer, int outLen)
int readbytes = 0;
int num_valid_chars = 0;
const char* thischar = inBuffer;
- char curchar;
+ signed char curchar;
int curOut = 0;
char tmp = 0;