summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--lib.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ea1aab3c..917c4ecb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2014-02-06 Kaz Kylheku <kaz@kylheku.com>
+ * lib.c (int_str): Regression: handle base argument properly.
+
+2014-02-06 Kaz Kylheku <kaz@kylheku.com>
+
* hash.c (hash_grow, make_hash, make_similar_hash, copy_hash):
Pass second argument to vector.
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);