Bug 770713 - Fix PC adjustment in JSOP_RETSUB (r=bhackett)

This commit is contained in:
Bill McCloskey 2012-08-09 11:38:47 -07:00
parent b3e1af2078
commit b257c7ff2f

View File

@ -3223,8 +3223,9 @@ BEGIN_CASE(JSOP_RETSUB)
goto error;
}
JS_ASSERT(rval.isInt32());
len = rval.toInt32();
regs.pc = script->code;
/* Increment the PC by this much. */
len = rval.toInt32() - int32_t(regs.pc - script->code);
END_VARLEN_CASE
}