diff options
Diffstat (limited to 'core/encoding')
| -rw-r--r-- | core/encoding/base32/base32.odin | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/encoding/base32/base32.odin b/core/encoding/base32/base32.odin index 34de2ff53..d272b32b8 100644 --- a/core/encoding/base32/base32.odin +++ b/core/encoding/base32/base32.odin @@ -153,15 +153,15 @@ decode :: proc( padding_count += 1 } - // Check for proper padding and length combinations - if padding_count > 0 { - // Verify no padding in the middle - for i := 0; i < data_len - padding_count; i += 1 { - if data[i] == byte(PADDING) { - return nil, .Malformed_Input - } + // Verify no padding in the middle + for i := 0; i < data_len - padding_count; i += 1 { + if data[i] == byte(PADDING) { + return nil, .Malformed_Input } + } + // Check for proper padding and length combinations + if padding_count > 0 { content_len := data_len - padding_count mod8 := content_len % 8 required_padding: int |