Version 3.0c - 11th January 2020

Fixes #19
This commit is contained in:
David Johnson-Davies 2020-01-11 18:06:01 +00:00 committed by GitHub
parent 3c45d5c97e
commit 0469088e9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/* uLisp ARM 3.0b - www.ulisp.com
David Johnson-Davies - www.technoblogy.com - 5th January 2020
/* uLisp ARM 3.0c - www.ulisp.com
David Johnson-Davies - www.technoblogy.com - 11th January 2020
Licensed under the MIT license: https://opensource.org/licenses/MIT
*/
@ -2754,6 +2754,7 @@ object *fn_sort (object *args, object *env) {
push(list,GCStack);
object *predicate = second(args);
object *compare = cons(NULL, cons(NULL, NULL));
push(compare,GCStack);
object *ptr = cdr(list);
while (cdr(ptr) != NULL) {
object *go = list;
@ -2770,7 +2771,7 @@ object *fn_sort (object *args, object *env) {
cdr(go) = obj;
} else ptr = cdr(ptr);
}
pop(GCStack);
pop(GCStack); pop(GCStack);
return cdr(list);
}