diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1006,6 +1006,12 @@ serror, SCRIPT_ERR_INVALID_STACK_OPERATION); } + bool fSuccess = true; + + // Subset of script starting at the most recent + // codeseparator + CScript scriptCode(pbegincodehash, pend); + // A bug causes CHECKMULTISIG to consume one extra // argument whose contents were not checked in any way. // @@ -1017,17 +1023,12 @@ return set_error(serror, SCRIPT_ERR_SIG_NULLDUMMY); } - // Subset of script starting at the most recent - // codeseparator - CScript scriptCode(pbegincodehash, pend); - // Remove signature for pre-fork scripts for (int k = 0; k < nSigsCount; k++) { valtype &vchSig = stacktop(-idxTopSig - k); CleanupScriptCode(scriptCode, vchSig, flags); } - bool fSuccess = true; size_t ikey = idxTopKey; size_t isig = idxTopSig; int nSigsRemaining = nSigsCount;