Skip to content

Commit d6e1d5d

Browse files
Fix #44 -- Thanks @HacKanCuBa!
1 parent 3f3bf06 commit d6e1d5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Base32.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public static function decodeNoPadding(string $encodedString, bool $upper = fals
197197
}
198198
if (($srcLen & 7) === 0) {
199199
for ($j = 0; $j < 7; ++$j) {
200-
if ($encodedString[$srcLen - 1] === '=') {
200+
if ($encodedString[$srcLen - $j] === '=') {
201201
throw new InvalidArgumentException(
202202
"decodeNoPadding() doesn't tolerate padding"
203203
);

0 commit comments

Comments
 (0)