diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-02-06 02:49:21 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-02-06 02:49:21 -0800 |
commit | 107b4f9c3530a637c18d4a5a05d0b0e02af7a8ca (patch) | |
tree | a22aa4e4c37a9508ec361514303dfc0c356d032f | |
parent | 7c2620a23a37fde4ef890acb444c4fbadf77dd33 (diff) | |
download | txr-107b4f9c3530a637c18d4a5a05d0b0e02af7a8ca.tar.gz txr-107b4f9c3530a637c18d4a5a05d0b0e02af7a8ca.tar.bz2 txr-107b4f9c3530a637c18d4a5a05d0b0e02af7a8ca.zip |
* lib.c (int_str): Regression: handle base argument properly.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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. @@ -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); |