From 64ce7ec6fe99ce3672007f181738da255e656e38 Mon Sep 17 00:00:00 2001 From: dzaima Date: Tue, 18 Oct 2022 19:26:53 +0300 Subject: [PATCH] =?UTF-8?q?fix=20non-squeezed=20string=20=E2=80=A2FFI=20ar?= =?UTF-8?q?guments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ffi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ffi.c b/src/ffi.c index a0f4448e..e5544642 100644 --- a/src/ffi.c +++ b/src/ffi.c @@ -393,6 +393,7 @@ BQNFFIEnt ffi_parseType(B arg, bool forRes) { // doesn't consume; parse argument if (!forRes) thrM("FFI: Argument type empty"); return (BQNFFIEnt){.t = ffi_type_void, .o=m_c32(sty_void), .resSingle=false}; } + arg = chr_squeezeChk(inc(arg)); MAKE_MUT(tmp, ia+1); mut_init(tmp, el_c32); MUTG_INIT(tmp); mut_copyG(tmp, 0, arg, 0, ia); @@ -426,6 +427,7 @@ BQNFFIEnt ffi_parseType(B arg, bool forRes) { // doesn't consume; parse argument t.resSingle = false; } mut_pfree(tmp, 0); + decG(arg); return t; }