This commit is contained in:
Benjamin Eriksson 2026-01-30 12:38:35 +01:00 committed by GitHub
commit 951a342b8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,7 +33,7 @@ export function toHex(data, delim=" ", padding=2, extraDelim="", lineSize=0) {
if (data instanceof ArrayBuffer) data = new Uint8Array(data);
let output = "";
const prepend = (delim === "0x" || delim === "\\x");
const prepend = (delim === "0x" || delim === "\\x" || delim === "%");
for (let i = 0; i < data.length; i++) {
const hex = data[i].toString(16).padStart(padding, "0");