From 23dd1d2f7ff31fb5068d4c2a9180121454f9989c Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Wed, 10 May 2017 17:06:09 +0300 Subject: [PATCH] lost save --- examples/interpret.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/interpret.rs b/examples/interpret.rs index 5fef6cd..7111f36 100644 --- a/examples/interpret.rs +++ b/examples/interpret.rs @@ -6,7 +6,7 @@ use parity_wasm::ModuleInstanceInterface; fn main() { let args: Vec<_> = args().collect(); - if args.len() != 2 { + if args.len() != 3 { println!("Usage: {} ", args[0]); println!(" wasm file should contain exported `_call` function with single I32 argument"); return; @@ -15,6 +15,6 @@ fn main() { let program = parity_wasm::ProgramInstance::new().expect("Failed to load program"); let module = parity_wasm::deserialize_file(&args[1]).expect("Failed to load module"); let module = program.add_module("main", module).expect("Failed to initialize module"); - let argument: i32 = args[1].parse().expect("Integer argument required"); + let argument: i32 = args[2].parse().expect("Integer argument required"); println!("Result: {:?}", module.execute_export("_call", vec![parity_wasm::RuntimeValue::I32(argument)])); }