Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Further plagiate git's implementation
Since j is not unsigned anymore we can reverse the table lookup loop
  • Loading branch information
romuald committed Feb 17, 2025
commit cb46a5db57abd8b12d790f454e07dbf1d4a244c5
4 changes: 2 additions & 2 deletions Modules/binascii.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,8 +1308,8 @@ binascii_b2a_base85_impl(PyObject *module, Py_buffer *data, Py_buffer *chars,
*ascii_data++ = 'y';
}
else {
for (int j = 0; j < 5 ; j++) {
ascii_data[4 - j] = table[value % 85];
for (int j = 4; j >= 0; j--) {
ascii_data[j] = table[value % 85];
value /= 85;
}
ascii_data += 5;
Expand Down