diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-03-10 06:56:46 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-03-10 06:56:46 -0800 |
commit | bb392fbb4beee89eaa5914191b3f58262f16d68b (patch) | |
tree | eb78fe22ba6d9d7fa2b58f409ff8c907b10c02e0 | |
parent | 7450285654ee48e010199f2e615a3451e09872f4 (diff) | |
download | txr-bb392fbb4beee89eaa5914191b3f58262f16d68b.tar.gz txr-bb392fbb4beee89eaa5914191b3f58262f16d68b.tar.bz2 txr-bb392fbb4beee89eaa5914191b3f58262f16d68b.zip |
sort: bugfix: broken for vectors/strings.
* lib.c (sort): Return the copied and sorted object object,
not the original.
-rw-r--r-- | lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -9679,7 +9679,8 @@ val sort(val seq, val lessfun, val keyfun) return nil; case SEQ_VECLIKE: case SEQ_HASHLIKE: - sort_vec(copy(seq), lessfun, keyfun); + seq = copy(seq); + sort_vec(seq, lessfun, keyfun); return seq; case SEQ_LISTLIKE: return sort_list(copy_list(seq), lessfun, keyfun); |