* libguile/throw.c (scm_exit_status): In one of my bogus patches, I
managed to make #<unspecified> reach this function, causing a segfault
on SCM_CAR. Refactor to be more robust.
int
scm_exit_status (SCM args)
{
- if (!SCM_NULL_OR_NIL_P (args))
+ if (scm_is_pair (args))
{
SCM cqa = SCM_CAR (args);
return (scm_to_int (cqa));
else if (scm_is_false (cqa))
return EXIT_FAILURE;
+ else
+ return EXIT_SUCCESS;
}
- return EXIT_SUCCESS;
+ else if (scm_is_null (args))
+ return EXIT_SUCCESS;
+ else
+ /* A type error. Strictly speaking we shouldn't get here. */
+ return EXIT_FAILURE;
}