Fixed Percent delimiter for hex encoding
This commit is contained in:
parent
2a1294f1c0
commit
a3258c6aec
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user