Melchior discovered that call(call) would crash due to a longstanding bug with argument parsing

This commit is contained in:
andy
2007-08-01 22:46:12 +00:00
parent 04c1e95f08
commit 5da33ca244

View File

@@ -224,7 +224,7 @@ static naRef f_call(naContext c, naRef me, int argc, naRef* args)
callns = argc > 3 ? args[3] : naNil(); // ditto
if(!IS_HASH(callme)) callme = naNil();
if(!IS_HASH(callns)) callns = naNil();
if(!IS_FUNC(args[0]) || (!IS_NIL(callargs) && !IS_VEC(callargs)))
if(argc==0 || !IS_FUNC(args[0]) || (!IS_NIL(callargs) && !IS_VEC(callargs)))
ARGERR();
subc = naSubContext(c);