Skip to content

Commit 1e2aa64

Browse files
gh-167: Make STRIP reject empty remove.
1 parent 15da301 commit 1e2aa64

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/builtins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5739,7 +5739,7 @@ static Value builtin_strip(Interpreter* interp, Value* args, int argc, Expr** ar
57395739
size_t haystack_len = strlen(haystack);
57405740

57415741
if (needle_len == 0) {
5742-
return value_str(haystack);
5742+
RUNTIME_ERROR(interp, "STRIP expects non-empty remove substring", line, col);
57435743
}
57445744

57455745
// Count non-overlapping occurrences of needle

0 commit comments

Comments
 (0)