mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-28 07:22:27 -08:00
Print integers using upcase letters for radix > 10 (P. Salvi)
This commit is contained in:
parent
bcfc297992
commit
f7afeb4c34
1 changed files with 2 additions and 2 deletions
|
|
@ -31,11 +31,11 @@ bignum_to_string(cl_object buffer, cl_object x, cl_object base)
|
|||
/* With the leading sign and the trailing null character,
|
||||
* only 62 digits fit in this buffer. */
|
||||
char txt[64];
|
||||
mpz_get_str(txt, b, x->big.big_num);
|
||||
mpz_get_str(txt, -b, x->big.big_num);
|
||||
_ecl_string_push_c_string(buffer, txt);
|
||||
} else {
|
||||
char *txt = ecl_alloc_atomic(str_size + 2);
|
||||
mpz_get_str(txt, b, x->big.big_num);
|
||||
mpz_get_str(txt, -b, x->big.big_num);
|
||||
_ecl_string_push_c_string(buffer, txt);
|
||||
ecl_dealloc(txt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue