summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index beb5762c..2e5091dd 100644
--- a/lib.c
+++ b/lib.c
@@ -3949,7 +3949,8 @@ val int_str(val str, val base)
if ((value == LONG_MAX || value == LONG_MIN) && errno == ERANGE) {
val bignum = make_bignum();
- unsigned char *ucs = utf8_dup_to_uc(wcs);
+ size_t size;
+ unsigned char *ucs = utf8_dup_to_buf(wcs, &size, 1);
mp_err err = mp_read_radix(mp(bignum), ucs, b);
free(ucs); /* TODO: make wchar_t version of mp_read_radix. */