From ff99436ce65ff66f50e2efa8896f3d1ed8cff099 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Mon, 30 May 2022 19:43:59 +0100 Subject: [PATCH] Fixed 'To Hex' highlighting --- src/core/operations/ToHex.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/operations/ToHex.mjs b/src/core/operations/ToHex.mjs index 2e97de8f..71893105 100644 --- a/src/core/operations/ToHex.mjs +++ b/src/core/operations/ToHex.mjs @@ -67,7 +67,7 @@ class ToHex extends Operation { * @returns {Object[]} pos */ highlight(pos, args) { - let delim, commaLen; + let delim, commaLen = 0; if (args[0] === "0x with comma") { delim = "0x"; commaLen = 1; @@ -86,7 +86,7 @@ class ToHex extends Operation { pos[0].start = pos[0].start * (2 + len) + countLF(pos[0].start); pos[0].end = pos[0].end * (2 + len) + countLF(pos[0].end); - // if the deliminators are not prepended, trim the trailing deliminator + // if the delimiters are not prepended, trim the trailing delimiter if (!(delim === "0x" || delim === "\\x")) { pos[0].end -= delim.length; }