Memcpy a struct in storage_var

let (result : ERC721PUT*) = alloc()
let (local _bid : ERC721PUT) = bids.read(bid_index)
memcpy(result, &_bid, ERC721PUT.SIZE) curious why this will not work? is &_bid not appropriate here ?

bids is a storage_var

I get this \nUnknown value for memory cell at address 12:12.\n assert [frame.dst] = [frame.src]\n

1 Like

Last time I had this error it was linked to the fact that the size was uncorrect.
I think this question would be answered more quickly on the discord :slight_smile:

Just to complete the circle for anybody else. I was returning from a function the array where the result_len was based on felt and not on ERC721PUT

return (result_len, result) ← result_len was the problem.

Thanks Gaetbout