From af03d08f74813014564521bc5bd88f212ab1f7ae Mon Sep 17 00:00:00 2001 From: tsai Date: Tue, 8 Oct 2024 12:08:30 +0800 Subject: [PATCH] Fix ptr_to_memref arg --- lib/charms/defm/expander.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/charms/defm/expander.ex b/lib/charms/defm/expander.ex index fb0b468..2c4b87c 100644 --- a/lib/charms/defm/expander.ex +++ b/lib/charms/defm/expander.ex @@ -500,7 +500,7 @@ defmodule Charms.Defm.Expander do term_ptr = Pointer.allocate(Term.t()) size = String.length(attr) buffer_ptr = Pointer.allocate(i8(), size) - buffer = ptr_to_memref(buffer_ptr) + buffer = ptr_to_memref(buffer_ptr, size) memref.copy(attr, buffer) zero = const 0 :: i32() enif_binary_to_term(unquote(env_var), buffer_ptr, size, term_ptr, zero)