diff options
author | Treeston <treeston.mmoc@gmail.com> | 2019-12-17 15:59:14 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-19 01:46:30 +0100 |
commit | 12f9423efa4a8304b99562013f706e4f1d894522 (patch) | |
tree | e1b787bd9b0767f4dfb859f6f8ec91fd90ae25ce /src/common/Encoding/Base32.cpp | |
parent | 64eb65cd45d1704831e3342bb7fcb8ff5df2df4e (diff) |
Common/Encoding: fix Base32 alphabet (oops)
(cherry picked from commit e457b77b4b8d8fcb8dcb916170e3b40273f0b966)
Diffstat (limited to 'src/common/Encoding/Base32.cpp')
-rw-r--r-- | src/common/Encoding/Base32.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/Encoding/Base32.cpp b/src/common/Encoding/Base32.cpp index 6866536848c..a091ed1ca18 100644 --- a/src/common/Encoding/Base32.cpp +++ b/src/common/Encoding/Base32.cpp @@ -36,9 +36,10 @@ struct B32Impl { if (v == '0') return Decode('O'); if (v == '1') return Decode('l'); + if (v == '8') return Decode('B'); if (('A' <= v) && (v <= 'Z')) return (v-'A'); if (('a' <= v) && (v <= 'z')) return (v-'a'); - if (('2' <= v) && (v <= '8')) return (v-'2')+26; + if (('2' <= v) && (v <= '7')) return (v-'2')+26; return DECODE_ERROR; } }; |