diff --git a/libraries/chain/webassembly/action.cpp b/libraries/chain/webassembly/action.cpp index 307ddafe6b..4ac120d499 100644 --- a/libraries/chain/webassembly/action.cpp +++ b/libraries/chain/webassembly/action.cpp @@ -5,9 +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( 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;