summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-03-09 20:15:52 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-03-09 20:15:52 -0700
commit6d962407c0ea219214c752a7a63fac83adab0301 (patch)
treed0167abb0f827cc67ae3002f3c0d6f648e71d7d2 /lib.c
parent0c514dc343033eafde26679f858796549a96cc8d (diff)
downloadtxr-6d962407c0ea219214c752a7a63fac83adab0301.tar.gz
txr-6d962407c0ea219214c752a7a63fac83adab0301.tar.bz2
txr-6d962407c0ea219214c752a7a63fac83adab0301.zip
* lib.c (lazy_sub_str): Bugfix: "from" was mistakenly used
in the adjustment of the "to" value. * match.c (search_form): Use predefined constants for -1 and 1 instead of calling num.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 2b5bd031..839dc116 100644
--- a/lib.c
+++ b/lib.c
@@ -2064,7 +2064,7 @@ static val lazy_sub_str(val lstr, val from, val to)
to = t;
} else {
if (lt(to, zero)) {
- to = plus(from, len = length_str(lstr));
+ to = plus(to, len = length_str(lstr));
to = max(zero, to);
}