Skip to content

Commit

Permalink
Base32 fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
boazsegev committed Nov 2, 2024
1 parent 81870f1 commit 349d0ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fio-stl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20095,8 +20095,8 @@ SFUNC int fio_string_write_base32dec(fio_str_info_s *dest,
*s++ = (0xFF & (val >> (bits - 8)));
bits -= 8;
}
if (bits) { /* letfover should we validate padding with `=`? */
*s++ = 0xFF & (val << (8 - bits));
if (bits) { /* letfover bits considered padding */
// *s++ = 0xFF & (val << (8 - bits));
}
dest->len = (size_t)(s - (uint8_t *)dest->buf);
dest->buf[dest->len] = 0;
Expand Down
4 changes: 2 additions & 2 deletions fio-stl/102 string core.h
Original file line number Diff line number Diff line change
Expand Up @@ -2118,8 +2118,8 @@ SFUNC int fio_string_write_base32dec(fio_str_info_s *dest,
*s++ = (0xFF & (val >> (bits - 8)));
bits -= 8;
}
if (bits) { /* letfover should we validate padding with `=`? */
*s++ = 0xFF & (val << (8 - bits));
if (bits) { /* letfover bits considered padding */
// *s++ = 0xFF & (val << (8 - bits));
}
dest->len = (size_t)(s - (uint8_t *)dest->buf);
dest->buf[dest->len] = 0;
Expand Down

0 comments on commit 349d0ea

Please sign in to comment.