summaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-03-14 02:45:20 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-03-14 02:45:20 -0700
commita8b0e36b1760e51a8a3a25d4e22a325e407ef3d4 (patch)
tree181e7880cabac7b05ea72a7e81578c291235bfdd /regex.c
parent9cfd4e0adf28ad932b2a99886c1aae96715669a3 (diff)
downloadtxr-a8b0e36b1760e51a8a3a25d4e22a325e407ef3d4.tar.gz
txr-a8b0e36b1760e51a8a3a25d4e22a325e407ef3d4.tar.bz2
txr-a8b0e36b1760e51a8a3a25d4e22a325e407ef3d4.zip
* parser.l (regex_parse, lisp_parse): Fix neglected handling of
optional arguments. This problem can cause the symbol : to be planted as the std_error stream, resulting in an error loop that blows the stack. * regex.c (regex_compile): Likewise.
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regex.c b/regex.c
index 2137ca56..b7f63113 100644
--- a/regex.c
+++ b/regex.c
@@ -1645,7 +1645,7 @@ static val regex_requires_dv(val exp)
val regex_compile(val regex_sexp, val error_stream)
{
if (stringp(regex_sexp)) {
- regex_sexp = regex_parse(regex_sexp, error_stream);
+ regex_sexp = regex_parse(regex_sexp, default_bool_arg(error_stream));
return if2(regex_sexp, regex_compile(regex_sexp, error_stream));
} else if (opt_derivative_regex || regex_requires_dv(regex_sexp)) {
return cons(compiled_regex_s, cons(dv_compile_regex(regex_sexp), nil));