summaryrefslogtreecommitdiffstats
path: root/src/basic/hexdecoct.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/basic/hexdecoct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/hexdecoct.c b/src/basic/hexdecoct.c
index 898ed83f86..ea683eb427 100644
--- a/src/basic/hexdecoct.c
+++ b/src/basic/hexdecoct.c
@@ -553,12 +553,12 @@ int unbase64char(char c) {
offset += '9' - '0' + 1;
- if (c == '+')
+ if (IN_SET(c, '+', '-')) /* Support both the regular and the URL safe character set (see above) */
return offset;
offset++;
- if (c == '/')
+ if (IN_SET(c, '/', '_')) /* ditto */
return offset;
return -EINVAL;