diff options
author | luigi1111 <luigi1111w@gmail.com> | 2019-08-19 17:37:37 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2019-08-19 17:37:37 -0500 |
commit | 4947f3bdba8cd5694bf667ff7ea58701a3233280 (patch) | |
tree | 687cc53e7b0c7edae210cd5f0515b2a83f281179 /src | |
parent | Merge pull request #5773 (diff) | |
parent | rpc: work around a GCC 7.4.0 (at least) bug (diff) | |
download | monero-4947f3bdba8cd5694bf667ff7ea58701a3233280.tar.xz |
Merge pull request #5636
b712ae0 rpc: work around a GCC 7.4.0 (at least) bug (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/rpc/rpc_handler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/rpc_handler.cpp b/src/rpc/rpc_handler.cpp index af5cb98a3..d528ffef3 100644 --- a/src/rpc/rpc_handler.cpp +++ b/src/rpc/rpc_handler.cpp @@ -63,7 +63,9 @@ namespace rpc d.cached_to -= 10; d.cached_top_hash = hash10; d.cached_m10_hash = crypto::null_hash; - d.cached_distribution.resize(d.cached_distribution.size() - 10); + CHECK_AND_ASSERT_MES(d.cached_distribution.size() >= 10, boost::none, "Cached distribution size does not match cached bounds"); + for (int p = 0; p < 10; ++p) + d.cached_distribution.pop_back(); can_extend = true; } } |