Don't use h(...).slice(2)

This commit is contained in:
Fabian 2022-07-28 22:52:17 +09:00
commit 3e88f3d012

View file

@ -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";