orangeduck / BuildYourOwnLisp

Learn C and build your own programming language in under 1000 lines of code!
http://www.buildyourownlisp.com/
Other
2.9k stars 394 forks source link

Fixes segfault in lval_eq when comparing lambdas and builtins #59

Closed krypt-n closed 10 years ago

krypt-n commented 10 years ago

if x is a lambda and y is a builtin, the lval_eq(x->formals,y->formals) would fail. This fixes it by not doing a lambda comparison if a builtin is involved.

orangeduck commented 10 years ago

Thanks!