Fixed bug where just typing numbers resulted in a seg-fault
This commit is contained in:
parent
7382155034
commit
a52490de8b
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ lval* lval_take(lval* v, int i) {
|
||||||
|
|
||||||
lval* lval_eval_sexpr(lenv* e, lval* v) {
|
lval* lval_eval_sexpr(lenv* e, lval* v) {
|
||||||
// No argument functions
|
// 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]);
|
lval* x = lenv_get(e, v->cell[0]);
|
||||||
if (x->type == LVAL_FUN) {
|
if (x->type == LVAL_FUN) {
|
||||||
lval_del(x);
|
lval_del(x);
|
||||||
|
|
Reference in a new issue