shithub: femtolisp

Download patch

ref: d3d3c35ffa33b02fb8fdc89025e6faa6bc387f29
parent: dc621773236a55a441dc2dce6b1c5d08e7fa10a1
author: Jeff Bezanson <jeff.bezanson@gmail.com>
date: Thu Jun 6 15:48:54 EDT 2019

fix part of #53, assertion failure on invalid dotted list

--- a/read.c
+++ b/read.c
@@ -539,8 +539,10 @@
             t = peek();
             if (ios_eof(F))
                 lerror(ParseError, "read: unexpected end of input");
-            if (t != TOK_CLOSE)
+            if (t != TOK_CLOSE) {
+                take();
                 lerror(ParseError, "read: expected ')'");
+            }
         }
     }
     take();