Changing &vec[0] to vec.data(), what 9804 missed
This commit is contained in:
parent
d81dccf191
commit
592404f03f
15 changed files with 48 additions and 49 deletions
src/script
|
@ -1366,7 +1366,7 @@ static bool VerifyWitnessProgram(const CScriptWitness& witness, int witversion,
|
|||
stack = std::vector<std::vector<unsigned char> >(witness.stack.begin(), witness.stack.end() - 1);
|
||||
uint256 hashScriptPubKey;
|
||||
CSHA256().Write(&scriptPubKey[0], scriptPubKey.size()).Finalize(hashScriptPubKey.begin());
|
||||
if (memcmp(hashScriptPubKey.begin(), &program[0], 32)) {
|
||||
if (memcmp(hashScriptPubKey.begin(), program.data(), 32)) {
|
||||
return set_error(serror, SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH);
|
||||
}
|
||||
} else if (program.size() == 20) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue