diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-06-22 07:39:30 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-06-22 07:39:30 -0700 |
commit | b9db5d41cbf4ef8fe1c07bf0f43e01e42e632702 (patch) | |
tree | 02c3dd2be0c79ca84c20a75abc12f8bcb4f220ed /lib.c | |
parent | 27ece3ffc30437f4a70228b96764e306bd5ed4f1 (diff) | |
download | txr-b9db5d41cbf4ef8fe1c07bf0f43e01e42e632702.tar.gz txr-b9db5d41cbf4ef8fe1c07bf0f43e01e42e632702.tar.bz2 txr-b9db5d41cbf4ef8fe1c07bf0f43e01e42e632702.zip |
lib: rmismatch tests and bugfix.
* lib.c (rmismatch): when left is an empty string or
vector, and right is nil: we must return -1 not zero.
* tests/012/seq.tl: More rmismatch tests.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -10996,7 +10996,7 @@ val rmismatch(val left, val right, val testfun_in, val keyfun_in) case VEC: switch (type(right)) { case NIL: - return if3(length(left) == zero, nil, zero); + return if3(length(left) == zero, nil, negone); case CONS: case LCONS: return rmismatch(right, left, testfun, keyfun); |