diff --git a/core/iwasm/common/wasm_application.c b/core/iwasm/common/wasm_application.c index da3b31c95..3b3be16c0 100644 --- a/core/iwasm/common/wasm_application.c +++ b/core/iwasm/common/wasm_application.c @@ -513,7 +513,7 @@ execute_func(WASMModuleInstanceCommon *module_inst, const char *name, bh_memcpy_s(&u.val, sizeof(double), &ud.d, sizeof(double)); } - if (endptr[0] == ':') { + if (endptr && endptr[0] == ':') { uint64 sig; union ieee754_double ud; sig = strtoull(endptr + 1, &endptr, 0);