diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-08 09:14:35 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-08 09:45:55 +0100 |
commit | 20846070c7809ac30a0aed3dbd4d04716e1ef1be (patch) | |
tree | 166a65df27fe78be34fdda1224eeadc8789872f1 /src/lundump.js | |
parent | a2031547aafbb07f6284cd10704435db23d9db60 (diff) | |
download | fengari-20846070c7809ac30a0aed3dbd4d04716e1ef1be.tar.gz fengari-20846070c7809ac30a0aed3dbd4d04716e1ef1be.tar.bz2 fengari-20846070c7809ac30a0aed3dbd4d04716e1ef1be.zip |
OP_LT, OP_EQ, fixed bad sBx
Diffstat (limited to 'src/lundump.js')
-rw-r--r-- | src/lundump.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lundump.js b/src/lundump.js index f2f91f1..b104e32 100644 --- a/src/lundump.js +++ b/src/lundump.js @@ -83,7 +83,7 @@ class BytecodeParser { readString(n) { let size = typeof n !== 'undefined' ? n : this.readByte() - 1; - if (size === 0xFF) // TODO test + if (size === 0xFF) // TODO: test this.offset += this.size_tSize; if (size === 0) { @@ -131,7 +131,7 @@ class BytecodeParser { C: (ins >> o.POS_C) & p.MASK1(o.SIZE_C, 0), Bx: (ins >> o.POS_Bx) & p.MASK1(o.SIZE_Bx, 0), Ax: (ins >> o.POS_Ax) & p.MASK1(o.SIZE_Ax, 0), - sBx: (ins >> o.POS_Bx) & p.MASK1(o.SIZE_Bx, 0) - o.MAXARG_sBx + sBx: ((ins >> o.POS_Bx) & p.MASK1(o.SIZE_Bx, 0)) - o.MAXARG_sBx }; console.log(` [${i}] Op: ${o.OpCodes[f.code[i].opcode]} A: ${f.code[i].A} B: ${f.code[i].B} C: ${f.code[i].C} Ax: ${f.code[i].Ax} Bx: ${f.code[i].Bx} sBx: ${f.code[i].sBx}`); |