aboutsummaryrefslogtreecommitdiff
path: root/builtins
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-03 21:09:11 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-03 21:09:11 -0400
commite15cb21cd5bfca686bd0d068280da3702aa9758e (patch)
treeec5f73127355f8f144a593553af333357aeb906b /builtins
parentc14ed3e3e71535e73352ead0ecaedaa46dc5aeee (diff)
Fix up CLI parsing
Diffstat (limited to 'builtins')
-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;
}