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

malloc in lval_copy #42

Closed radiofreejohn closed 10 years ago

radiofreejohn commented 10 years ago

Shouldn't the malloc for strings/errors read: malloc(sizeof(char) * (strlen(v->err)+1)) not just malloc(strlen(v->err)+1) ?

radiofreejohn commented 10 years ago

Never mind, I guess char should always be 1 :)