diff --git a/libraries/chain/webassembly/action.cpp b/libraries/chain/webassembly/action.cpp index fa8bc58981..4ac120d499 100644 --- a/libraries/chain/webassembly/action.cpp +++ b/libraries/chain/webassembly/action.cpp @@ -5,10 +5,8 @@ namespace eosio { namespace chain { namespace webassembly { int32_t interface::read_action_data(legacy_span memory) const { auto s = context.get_action().data.size(); - if( s == 0 ) return s; - if( memory.size() == 0 ) return s; - auto copy_size = std::min( static_cast(memory.size()), s ); + if( copy_size == 0 ) return s; std::memcpy( memory.data(), context.get_action().data.data(), copy_size ); return copy_size;