error when argument of apply is not a proper list

This commit is contained in:
Yuichi Nishiwaki 2013-11-11 08:01:08 +09:00
parent 9a1e7d0ab1
commit 4fea9169cc
1 changed files with 4 additions and 0 deletions

View File

@ -301,6 +301,10 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
goto L_RAISE;
}
if (! pic_list_p(pic, argv)) {
pic_error(pic, "argv must be a proper list");
}
argc = pic_length(pic, argv) + 1;
#if VM_DEBUG