summaryrefslogtreecommitdiff
path: root/basecode.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-01-13 09:01:18 -0500
committerJeffrey Walton <noloader@gmail.com>2018-01-13 09:01:18 -0500
commit23f3328948dc666f76c83d4b07a0212def1d9440 (patch)
tree4919d68cb9ab833e611ee658fe7a1e4856ee5acd /basecode.cpp
parentaa7f6c47d15337a0e41a3b97778db8f217462008 (diff)
downloadcryptopp-git-23f3328948dc666f76c83d4b07a0212def1d9440.tar.gz
Add additional Encoder and Decoder alphabet test (GH #562)
Diffstat (limited to 'basecode.cpp')
-rw-r--r--basecode.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/basecode.cpp b/basecode.cpp
index c96087ec..a9a27892 100644
--- a/basecode.cpp
+++ b/basecode.cpp
@@ -181,16 +181,16 @@ void BaseN_Decoder::InitializeDecodingLookupArray(int *lookup, const byte *alpha
for (unsigned int i=0; i<base; i++)
{
+ // Debug asserts for 'lookup[alphabet[i]] == -1' removed because the self tests
+ // have unusal tests that try to break the encoders and decoders. Tests include
+ // a string of the same characters. I.,e., a string of stars like '********...'.
if (caseInsensitive && isalpha(alphabet[i]))
{
- CRYPTOPP_ASSERT(lookup[toupper(alphabet[i])] == -1);
lookup[toupper(alphabet[i])] = i;
- CRYPTOPP_ASSERT(lookup[tolower(alphabet[i])] == -1);
lookup[tolower(alphabet[i])] = i;
}
else
{
- CRYPTOPP_ASSERT(lookup[alphabet[i]] == -1);
lookup[alphabet[i]] = i;
}
}