base64: Assert that input is multiple of 4

This commit is contained in:
Tatsuhiro Tsujikawa 2016-10-03 22:04:32 +09:00
parent 4b5179a544
commit 75039c573c
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ OutputIt decode(InputIt first, InputIt last, OutputIt d_first) {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1};
assert(std::distance(first, last) % 4 == 0);
auto p = d_first;
for (; first != last;) {
uint32_t n = 0;