Fix random state test 649 (see https://github.com/ethereum/tests/commit/17f7e7a6c64bb878c1b6af9dc8371b46c133e46d)
@@ -142,6 +142,11 @@ impl Memory {
len: U256,
data: &[u8]
) -> Result<(), ExitFatal> {
+ if len.is_zero() {
+ // a zero-length copy is defined to be a no-op
+ return Ok(());
+ }
+
let memory_offset = if memory_offset > U256::from(usize::max_value()) {
return Err(ExitFatal::NotSupported)
} else {
