Skip to content

Commit

Permalink
GH-1062 Need to copy yield function since it is a const&
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed May 8, 2023
1 parent 0966651 commit 05ff752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/chain/abi_serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace eosio { namespace chain {
template <typename T>
inline fc::variant variant_from_stream(fc::datastream<const char*>& stream, const abi_serializer::yield_function_t& yield) {
yield(0); // reset deadline
fc::yield_function_t y = [&yield](){ yield(1); }; // create yield function matching fc::variant requirements, 0 for recursive depth
fc::yield_function_t y = [yield](){ yield(1); }; // create yield function matching fc::variant requirements, 0 for recursive depth
T temp;
fc::raw::unpack( stream, temp );
y();
Expand Down

0 comments on commit 05ff752

Please sign in to comment.