diff options
| author | Riccardo Spagni <ric@spagni.net> | 2017-10-06 23:00:24 +0400 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2017-10-06 23:00:24 +0400 |
| commit | 09ccd07bbc44ab208e8d15057dbc17c9bdf3ba00 (patch) | |
| tree | ce9652a45497ed2e6ab3788520ee0a48c414b6e9 /src/wallet | |
| parent | e8a7291d1283f26a33b0250cbd125b000e6e3b7f (diff) | |
| parent | 180a848cbeba64c563bb0f09318b875e2b80a236 (diff) | |
| download | monzero-core-09ccd07bbc44ab208e8d15057dbc17c9bdf3ba00.tar.gz monzero-core-09ccd07bbc44ab208e8d15057dbc17c9bdf3ba00.tar.xz monzero-core-09ccd07bbc44ab208e8d15057dbc17c9bdf3ba00.zip | |
Merge pull request #2542
180a848c wallet2: Missing underflow check on low heights (landergate)
Diffstat (limited to 'src/wallet')
| -rw-r--r-- | src/wallet/wallet2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index cacdc6b3e..dc4f4879b 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2228,7 +2228,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const std::stri // Set blockchain height calculated from current date/time uint64_t approx_blockchain_height = get_approximate_blockchain_height(); if(approx_blockchain_height > 0) { - m_refresh_from_block_height = approx_blockchain_height - blocks_per_month; + m_refresh_from_block_height = approx_blockchain_height >= blocks_per_month ? approx_blockchain_height - blocks_per_month : 0; } } bool r = store_keys(m_keys_file, password, false); |
