Version 2.7c - 20th June 2019

Fixes #14
This commit is contained in:
David Johnson-Davies 2019-06-20 16:15:08 +01:00 committed by GitHub
parent 774cf149c4
commit 9ae263f83f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/* uLisp ARM 2.7b - www.ulisp.com
David Johnson-Davies - www.technoblogy.com - 9th June 2019
/* uLisp ARM 2.7c - www.ulisp.com
David Johnson-Davies - www.technoblogy.com - 20th June 2019
Licensed under the MIT license: https://opensource.org/licenses/MIT
*/
@ -972,8 +972,11 @@ object *closure (int tc, object *fname, object *state, object *function, object
function = cdr(function);
// Dropframe
if (tc) {
while (*env != NULL && car(*env) != NULL) pop(*env);
} else push(nil, *env);
if (*env != NULL && car(*env) == NULL) {
pop(*env);
while (*env != NULL && car(*env) != NULL) pop(*env);
} else push(nil, *env);
}
// Push state
while (state != NULL) {
object *pair = first(state);
@ -1014,6 +1017,7 @@ object *closure (int tc, object *fname, object *state, object *function, object
if (args != NULL) error2(fname, PSTR("has too many arguments"));
if (trace) { pserial(')'); pln(pserial); }
// Do an implicit progn
if (tc) push(nil, *env);
return tf_progn(function, *env);
}