diff --git a/js/src/jsinterp.cpp b/js/src/jsinterp.cpp index 8aa7dd920b5..eb67a6a962c 100644 --- a/js/src/jsinterp.cpp +++ b/js/src/jsinterp.cpp @@ -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 }