Archived
1
0
Fork 0

Fixed bug where just typing numbers resulted in a seg-fault

This commit is contained in:
Brandon Rozek 2018-06-09 23:02:44 -04:00
parent 7382155034
commit a52490de8b

View file

@ -56,7 +56,7 @@ lval* lval_take(lval* v, int i) {
lval* lval_eval_sexpr(lenv* e, lval* v) {
// No argument functions
if (v->count == 1) {
if (v->count == 1 && v->cell[0]->type == LVAL_SYM) {
lval* x = lenv_get(e, v->cell[0]);
if (x->type == LVAL_FUN) {
lval_del(x);