From a10b92fe718a8e056853e62a7c17b1d9d48f272a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Mon, 4 Mar 2024 18:41:12 +0100 Subject: [PATCH] Runtime: fix caml_wrap_exception --- runtime/wasm/jslib.wat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/wasm/jslib.wat b/runtime/wasm/jslib.wat index 8e309ab92..008ce560f 100644 --- a/runtime/wasm/jslib.wat +++ b/runtime/wasm/jslib.wat @@ -647,7 +647,10 @@ (call $wrap (call $meth_call (local.get $exn) - (array.new_data $string $toString (i32.const 0) (i32.const 8)) + (call $unwrap + (call $caml_jsstring_of_string + (array.new_data $string $toString + (i32.const 0) (i32.const 8)))) (extern.internalize (call $new_array (i32.const 0)))))))) (func (export "caml_js_error_option_of_exception")