diff --git a/arbos/programs/native.go b/arbos/programs/native.go index 73d3fe83d7..cfc1170c5b 100644 --- a/arbos/programs/native.go +++ b/arbos/programs/native.go @@ -450,10 +450,16 @@ func addressToBytes20(addr common.Address) bytes20 { } func (slice *rustSlice) read() []byte { + if slice.len == 0 { + return nil + } return arbutil.PointerToSlice((*byte)(slice.ptr), int(slice.len)) } func (vec *rustBytes) read() []byte { + if vec.len == 0 { + return nil + } return arbutil.PointerToSlice((*byte)(vec.ptr), int(vec.len)) }