diff --git a/src/ffi.c b/src/ffi.c index 26f675d6..483c9d8b 100644 --- a/src/ffi.c +++ b/src/ffi.c @@ -1082,6 +1082,7 @@ static u64 calcStaticSize(B o) { } B ffiload_c2(B t, B w, B x) { + if (!isArr(x) || RNK(x)!=1) thrM("•FFI: 𝕩 must be a list"); usz xia = IA(x); if (xia<2) thrM("FFI: Function specification must have at least two items"); usz argn = xia-2; diff --git a/test/cases/ffi.bqn b/test/cases/ffi.bqn index 16038a91..543d02a1 100644 --- a/test/cases/ffi.bqn +++ b/test/cases/ffi.bqn @@ -5,6 +5,8 @@ # bad •FFI invocation # generally weird +!"•FFI: 𝕩 must be a list" % @•FFI @ +!"•FFI: 𝕩 must be a list" % @•FFI 2‿2⥊<"a" !"•FFI: Path must be a list of characters" % 1‿2 •FFI ""‿"bqn_init" !"This function can't be called monadically" % •FFI ""‿"bqn_init" @ •FFI⎊{𝕊: 28↑•CurrentError@} ""‿"bqn_this symbol doesn't exist" %% "FFI: Failed to find symbol: "