summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-03-06 16:11:41 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-03-06 16:27:00 -0800
commitbfb85ee47ae477920a830386e4804a341c7e260b (patch)
tree579127f0aee080f177e445945c13393ed9e70c1e /stream.c
parent0947babd7882a64843889357c789f238c5be0afa (diff)
downloadtxr-bfb85ee47ae477920a830386e4804a341c7e260b.tar.gz
txr-bfb85ee47ae477920a830386e4804a341c7e260b.tar.bz2
txr-bfb85ee47ae477920a830386e4804a341c7e260b.zip
Bugfix: get-string closing stream when told not to.
* stream.c (get_string): Use default_arg_strict instead of default_arg, so that the t value is only substituted for a missing argument, not for a nil argument.
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream.c b/stream.c
index d112c71e..cbb6821a 100644
--- a/stream.c
+++ b/stream.c
@@ -3195,7 +3195,7 @@ val get_string(val stream, val nchars, val close_after_p)
}
if ((missingp(close_after_p) && (!opt_compat || opt_compat > 102)) ||
- default_arg(close_after_p, t))
+ default_arg_strict(close_after_p, t))
close_stream(stream, t);
return get_string_from_stream(strstream);