rxi / fe

A tiny, embeddable language implemented in ANSI C
MIT License
1.31k stars 82 forks source link

`fe_write()` crashes on circular lists #19

Open ooichu opened 1 year ago

ooichu commented 1 year ago

This problem can be solved by marking all pairs (just like garbage collection) before printing, and unmarking them afterwards. If marked object was found during printing, you should output something like .... But this will slow down fe_write() twice.