summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index e00f8d1f..881d2c0c 100644
--- a/lib.c
+++ b/lib.c
@@ -496,12 +496,12 @@ val replace_list(val list, val from, val to, val items)
else if (from == t)
from = nil;
else if (lt(from, zero))
- from = plus(from, len ? len : len = length(list));
+ from = plus(from, len ? len : (len = length(list)));
if (to == t)
to = nil;
if (to && lt(to, zero))
- to = plus(to, len ? len : len = length(list));
+ to = plus(to, len ? len : (len = length(list)));
if (!to || (len && ge(to, len))) {
if (from && zerop(from)) {