summaryrefslogtreecommitdiff
path: root/wasm2c/examples/fac/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'wasm2c/examples/fac/main.c')
-rw-r--r--wasm2c/examples/fac/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/wasm2c/examples/fac/main.c b/wasm2c/examples/fac/main.c
index 5a91b161..30bf5d0a 100644
--- a/wasm2c/examples/fac/main.c
+++ b/wasm2c/examples/fac/main.c
@@ -5,7 +5,10 @@
int main(int argc, char** argv) {
/* Make sure there is at least one command-line argument. */
- if (argc < 2) return 1;
+ if (argc < 2) {
+ printf("Invalid argument. Expected '%s NUMBER'\n", argv[0]);
+ return 1;
+ }
/* Convert the argument from a string to an int. We'll implicitly cast the int
to a `u32`, which is what `fac` expects. */