examples: Fix condition in example Precompiles VM

This commit is contained in:
Paweł Bylica 2019-11-05 12:52:00 +01:00
parent 206eb71c9e
commit 3f6ea7ac7d
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ static evmc_result execute(evmc_vm* /*unused*/,
constexpr auto prefix_size = sizeof(evmc_address) - 2;
const auto& dst = msg->destination;
// Check if the address prefix is all zeros.
if (std::all_of(&dst.bytes[0], &dst.bytes[prefix_size], [](uint8_t x) { return x == 0; }))
if (std::any_of(&dst.bytes[0], &dst.bytes[prefix_size], [](uint8_t x) { return x != 0; }))
{
// If not, reject the execution request.
auto result = evmc_result{};