Skip to content

Commit

Permalink
Merge bitcoin#9555: [test] Avoid reading a potentially uninitialized …
Browse files Browse the repository at this point in the history
…variable in tx_invalid-test (transaction_tests.cpp)

8455e36 [test] Avoid reading a potentially uninitialized variable in tx_invalid-test (practicalswift)

Tree-SHA512: 1064cdd5c9e4612a05397a5880535d93dbb18dec4897b4bbda9e6ad78d30f4c72303e4d23159398f1b33545ff5819e739e374d7cde757e402b26c355268a2319
  • Loading branch information
MarcoFalke authored and PastaPastaPasta committed Feb 5, 2019
1 parent a31b2de commit 31267f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/transaction_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
// verifyFlags is a comma separated list of script verification flags to apply, or "NONE"
UniValue tests = read_json(std::string(json_tests::tx_invalid, json_tests::tx_invalid + sizeof(json_tests::tx_invalid)));

ScriptError err;
// Initialize to SCRIPT_ERR_OK. The tests expect err to be changed to a
// value other than SCRIPT_ERR_OK.
ScriptError err = SCRIPT_ERR_OK;
for (unsigned int idx = 0; idx < tests.size(); idx++) {
UniValue test = tests[idx];
std::string strTest = test.write();
Expand Down

0 comments on commit 31267f4

Please sign in to comment.