summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-04 07:03:44 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-04 07:03:44 -0700
commit2a7f0136df10e5a6d10988b6040267e771ee5df6 (patch)
tree3a691cfd7aa90c5bdbe77155ec4b3257dca96cbd /txr.c
parentb074efb9c179238f7772ba7ea413afc5cb3133ba (diff)
downloadtxr-2a7f0136df10e5a6d10988b6040267e771ee5df6.tar.gz
txr-2a7f0136df10e5a6d10988b6040267e771ee5df6.tar.bz2
txr-2a7f0136df10e5a6d10988b6040267e771ee5df6.zip
Fix treatment of "false" in out-of-memory handler.
* txr.c (oom_realloc_handler): When terminating, only print the word false if the print-bindings option -B is in effect. Also, print it to standard output, not standard error.
Diffstat (limited to 'txr.c')
-rw-r--r--txr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/txr.c b/txr.c
index 83bdf1a8..5a79611e 100644
--- a/txr.c
+++ b/txr.c
@@ -72,7 +72,8 @@ val stdlib_path;
static mem_t *oom_realloc_handler(mem_t *old, size_t size)
{
format(std_error, lit("~a: out of memory\n"), prog_string, nao);
- put_line(lit("false"), std_error);
+ if (opt_print_bindings)
+ put_line(lit("false"), std_output);
abort();
}