fix a bug that pic_apply faults when cfunc proc is given in DEBUG mode

This commit is contained in:
Yuichi Nishiwaki 2013-11-09 14:12:36 +09:00
parent 125189e25e
commit 89eceec7f8
1 changed files with 7 additions and 2 deletions

View File

@ -282,8 +282,13 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
printf(" argv = "); printf(" argv = ");
pic_debug(pic, argv); pic_debug(pic, argv);
puts(""); puts("");
printf(" irep = "); if (! proc->cfunc_p) {
print_irep(pic, proc->u.irep); printf(" irep = ");
print_irep(pic, proc->u.irep);
}
else {
printf(" cfunc = %p\n", proc->u.cfunc);
}
puts("\nLet's go!"); puts("\nLet's go!");
#endif #endif