diff --git a/src/browser/print_stats.js b/src/browser/print_stats.js index 289ebcf6..010ee220 100644 --- a/src/browser/print_stats.js +++ b/src/browser/print_stats.js @@ -239,7 +239,7 @@ const print_stats = { for(let i = 0; i < 0x100; i++) { - text += h(i, 2).slice(2) + ":" + v86util.pads(Math.round(per_opcode[i] / factor), pad_length); + text += i.toString(16).padStart(2, "0") + ":" + v86util.pads(Math.round(per_opcode[i] / factor), pad_length); if(i % 16 == 15) text += "\n"; @@ -252,7 +252,7 @@ const print_stats = { for(let i = 0; i < 0x100; i++) { - text += h(i & 0xFF, 2).slice(2) + ":" + v86util.pads(Math.round(per_opcode0f[i] / factor), pad_length); + text += (i & 0xFF).toString(16).padStart(2, "0") + ":" + v86util.pads(Math.round(per_opcode0f[i] / factor), pad_length); if(i % 16 == 15) text += "\n";