mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
* numbers.c (scm_number_to_string): Signal an error if radix is
less than two. (Thanks to Jorgen Schaefer.)
This commit is contained in:
parent
fac688761c
commit
d4a2839e92
1 changed files with 5 additions and 1 deletions
|
@ -1820,7 +1820,11 @@ scm_number_to_string (x, radix)
|
|||
if (SCM_UNBNDP (radix))
|
||||
radix = SCM_MAKINUM (10L);
|
||||
else
|
||||
SCM_ASSERT (SCM_INUMP (radix), radix, SCM_ARG2, s_number_to_string);
|
||||
{
|
||||
SCM_ASSERT (SCM_INUMP (radix), radix, SCM_ARG2, s_number_to_string);
|
||||
SCM_ASSERT (SCM_INUM (radix) >= 2, radix, SCM_OUTOFRANGE,
|
||||
s_number_to_string);
|
||||
}
|
||||
#ifdef SCM_FLOATS
|
||||
if (SCM_NINUMP (x))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue