# HG changeset patch # User Matthew Wild # Date 1290393076 0 # Node ID 1e49dfb8ccdc21276bb2e329cc15a5f20d87511c # Parent 5318bb31b0ac511975fd024b28ae6331727303a8 Fix OP_CALL to handle the case of B==1 (no parameters) and fix an off-by-one error that wouldn't fill the stack with nils properly diff -r 5318bb31b0ac -r 1e49dfb8ccdc lvm.js --- a/lvm.js Sun Nov 21 21:37:07 2010 +0000 +++ b/lvm.js Mon Nov 22 02:31:16 2010 +0000 @@ -475,8 +475,12 @@ var f = frame.reg[INS_A(instruction)].precall(); // return JS or LValue var A = INS_A(instruction), B = INS_B(instruction), C = INS_C(instruction); var undefined; - var args = frame.reg.slice(A+1, B==0?undefined:(A+B)); - for(var i=args.length+1;i