From 107b4f9c3530a637c18d4a5a05d0b0e02af7a8ca Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 6 Feb 2014 02:49:21 -0800 Subject: * lib.c (int_str): Regression: handle base argument properly. --- ChangeLog | 4 ++++ lib.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ea1aab3c..917c4ecb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-02-06 Kaz Kylheku + + * lib.c (int_str): Regression: handle base argument properly. + 2014-02-06 Kaz Kylheku * hash.c (hash_grow, make_hash, make_similar_hash, copy_hash): diff --git a/lib.c b/lib.c index 74c712b3..c4415ac2 100644 --- a/lib.c +++ b/lib.c @@ -2448,7 +2448,7 @@ val int_str(val str, val base) { const wchar_t *wcs = c_str(str); wchar_t *ptr; - cnum b = if3(base, c_num(base), 10); + cnum b = c_num(default_arg(base, num_fast(10))); /* TODO: detect if we have wcstoll */ long value = wcstol(wcs, &ptr, b ? b : 10); -- cgit v1.2.3