aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-04-30 20:03:35 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-05-04 06:55:31 +0200
commitfac30eec42c486ec1bfd696293040a7aa0f04625 (patch)
tree562aadddf3da65e1366d45b2860d8e11c476d866 /src/script/interpreter.cpp
parentfaece47c4706783e0460ed977390a44630b2d44c (diff)
downloadbitcoin-fac30eec42c486ec1bfd696293040a7aa0f04625.tar.xz
refactor: Replace &foo[0] with foo.data()
Diffstat (limited to 'src/script/interpreter.cpp')
-rw-r--r--src/script/interpreter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 7e119bb3c4..dc0f165be0 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -1890,7 +1890,7 @@ static bool VerifyWitnessProgram(const CScriptWitness& witness, int witversion,
const valtype& script_bytes = SpanPopBack(stack);
exec_script = CScript(script_bytes.begin(), script_bytes.end());
uint256 hash_exec_script;
- CSHA256().Write(&exec_script[0], exec_script.size()).Finalize(hash_exec_script.begin());
+ CSHA256().Write(exec_script.data(), exec_script.size()).Finalize(hash_exec_script.begin());
if (memcmp(hash_exec_script.begin(), program.data(), 32)) {
return set_error(serror, SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH);
}