summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--regex.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fefd532f..e4351d31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2015-02-20 Kaz Kylheku <kaz@kylheku.com>
+ * regex.c (match_regex_right): Bugfix: zero length matches
+ should return zero length, rather than nil. This is achieved by trying
+ the match at one past the last character.
+
+2015-02-20 Kaz Kylheku <kaz@kylheku.com>
+
String-returning wrappers for some regex matching functions.
* eval.c (eval_init): Register search-regst, match-regst
diff --git a/regex.c b/regex.c
index 1c7c63a3..fade9449 100644
--- a/regex.c
+++ b/regex.c
@@ -2084,7 +2084,7 @@ val match_regex_right(val str, val regex, val end)
if (null_or_missing_p(end) || gt(end, slen))
end = slen;
- while (lt(pos, end)) {
+ while (le(pos, end)) {
cons_bind (from, len, search_regex(str, regex, pos, nil));
if (!from)