diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-22 23:58:13 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-22 23:58:13 +0200 |
commit | 8ee081ba24c1fdbce25f7d8a7f3c452369f25209 (patch) | |
tree | 64b308ba1431eeaaf46244c8eccaf581c1b40163 | |
parent | 90dd81762b1c62246a31245d8bbb27966b1d5452 (diff) |
REPL: Don't crash when printing NIL.
-rw-r--r-- | MLKReadEvalPrintLoop.m | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MLKReadEvalPrintLoop.m b/MLKReadEvalPrintLoop.m index a6eb267..b5710f2 100644 --- a/MLKReadEvalPrintLoop.m +++ b/MLKReadEvalPrintLoop.m @@ -92,8 +92,11 @@ static const char *prompt (EditLine *e) { globalContext] withEnvironment:[MLKLexicalEnvironment globalEnvironment]]; - - printf ("%s\n", [[result descriptionForLisp] UTF8String]); + + if (result) + printf ("%s\n", [[result descriptionForLisp] UTF8String]); + else + printf ("()\n"); } NS_HANDLER { |