aboutsummaryrefslogtreecommitdiff
path: root/builtins/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtins/util.c')
-rw-r--r--builtins/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtins/util.c b/builtins/util.c
index 7fca15e3..4f108f04 100644
--- a/builtins/util.c
+++ b/builtins/util.c
@@ -105,7 +105,7 @@ public CORD CORD_replace(CORD c, CORD to_replace, CORD replacement)
while (pos < len) {
size_t found = CORD_str(c, pos, to_replace);
if (found == CORD_NOT_FOUND) {
- if (pos < len-1)
+ if (pos < len)
ret = CORD_cat(ret, CORD_substr(c, pos, len));
return ret;
}