From e15cb21cd5bfca686bd0d068280da3702aa9758e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 3 Sep 2024 21:09:11 -0400 Subject: Fix up CLI parsing --- builtins/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtins') 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; } -- cgit v1.2.3