]> git.lizzy.rs Git - rust.git/commitdiff
adjust for get_fn signature change
authorRalf Jung <post@ralfj.de>
Mon, 1 Jul 2019 21:07:40 +0000 (23:07 +0200)
committerRalf Jung <post@ralfj.de>
Sat, 6 Jul 2019 08:07:22 +0000 (10:07 +0200)
src/shims/foreign_items.rs

index 7ab97c87e305650c3c8f2b67e42f221f5b0515b1..9dbb55668ef35dc707ab4fdbce71e8877250a7eb 100644 (file)
@@ -338,7 +338,7 @@ fn emulate_foreign_item(
                 //     vtable_ptr: *mut usize,
                 // ) -> u32
                 // We abort on panic, so not much is going on here, but we still have to call the closure.
-                let f = this.read_scalar(args[0])?.to_ptr()?;
+                let f = this.read_scalar(args[0])?.not_undef()?;
                 let data = this.read_scalar(args[1])?.not_undef()?;
                 let f_instance = this.memory().get_fn(f)?.as_instance()?;
                 this.write_null(dest)?;