Skip to content

Commit

Permalink
Optimize xxd script.
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciech-graj committed Apr 25, 2023
1 parent bb60978 commit 08ecf12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/xxd.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
filename = sys.argv[1]
varname = f"{filename[3:].replace('.', '_').replace('/', '_').replace('-', '_')}"
with open(filename, "rb") as f:
data = [hex(c) for c in f.read()]
data = [str(c) for c in f.read()]
print(
f"const unsigned char {varname}[]={{"
+ ','.join(data)
Expand Down

0 comments on commit 08ecf12

Please sign in to comment.