Skip to content

Commit

Permalink
Corrected the set_user_id.py script to put the bits in the correct
Browse files Browse the repository at this point in the history
direction when casting from an integer to a binary string.  This
is the same correction that was made to caravel-gf180mcu some time
ago.  Thanks to Mitch Bailey for finding and reporting the issue.
  • Loading branch information
RTimothyEdwards committed Dec 6, 2023
1 parent 05baf48 commit d479ca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/set_user_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def usage():

try:
user_id_int = int('0x' + user_id_value, 0)
user_id_bits = '{0:032b}'.format(user_id_int)
user_id_bits = '{0:032b}'.format(user_id_int)[::-1]
except:
print('Error: Cannot parse user ID "' + user_id_value + '" as an 8-digit hex number.')
sys.exit(1)
Expand Down

0 comments on commit d479ca1

Please sign in to comment.