Skip to content

Commit

Permalink
gh-108753: _Py_PrintSpecializationStats() uses Py_hexdigits
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Sep 6, 2023
1 parent 60a9eea commit ecbd4c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ _Py_PrintSpecializationStats(int to_file)
char hex_name[41];
_PyOS_URandomNonblock(rand, 20);
for (int i = 0; i < 20; i++) {
hex_name[2*i] = "0123456789abcdef"[rand[i]&15];
hex_name[2*i+1] = "0123456789abcdef"[(rand[i]>>4)&15];
hex_name[2*i] = Py_hexdigits[rand[i]&15];
hex_name[2*i+1] = Py_hexdigits[(rand[i]>>4)&15];
}
hex_name[40] = '\0';
char buf[64];
Expand Down

0 comments on commit ecbd4c4

Please sign in to comment.