wallet2: initialize amount to 0 in tx_scan_info_t ctor

It seems the more prudent thing to do here. It will not catch
attempts to use that value before it is initialized when using
ASAN or valgrind, but in a case where it does, it will have
smaller repercussions.

So it seems appropriate in this particular case.

Coverity 182498
This commit is contained in:
moneromooo-monero 2018-10-08 13:09:18 +00:00
parent 4cbb476cd1
commit cbe0122bf1
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ namespace tools
bool error;
boost::optional<cryptonote::subaddress_receive_info> received;
tx_scan_info_t(): money_transfered(0), error(true) {}
tx_scan_info_t(): amount(0), money_transfered(0), error(true) {}
};
struct transfer_details