From b59729c17f6ea4ebcec986683e2c60902e7c6fa8 Mon Sep 17 00:00:00 2001 From: Drahflow Date: Wed, 26 Aug 2015 12:38:25 +0200 Subject: Don't crash on [] in sort --- TODO | 1 + elymas/lib/sort.ey | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index c6afa61..3b27c99 100644 --- a/TODO +++ b/TODO @@ -10,6 +10,7 @@ * don't allocate ints for syscalls if not necessary * *THISSCOPE could also work with PUSH * handle huge objects better (and move them out of linear heap space) +* make map work on non-strings, too * utf8 * regex substitution * asm-based regex engine diff --git a/elymas/lib/sort.ey b/elymas/lib/sort.ey index 2cac3cf..6692cf2 100644 --- a/elymas/lib/sort.ey +++ b/elymas/lib/sort.ey @@ -15,7 +15,9 @@ ] } ? * } /mergeSort deffst - 0 |d len 1 sub mergeSort + |a len { + 0 |d len 1 sub mergeSort + } { [ ] } ? * } /order deffd { _ |lt order -01 { * }_ [ 0 ] [ 0 ] '' * } /sort deffd -- cgit v1.2.3