This commit is contained in:
Fabian Boehm 2024-05-25 22:21:52 +02:00
parent d5101e1923
commit 1d0f1d2697

View file

@ -940,10 +940,9 @@ fn set_internal(
// Indexes must be > 0. (Note split_var_and_indexes negates negative values).
for ind in &split.indexes {
if *ind <= 0 {
streams.err.append(wgettext_fmt!(
"%ls: array index out of bounds\n",
cmd
));
streams
.err
.append(wgettext_fmt!("%ls: array index out of bounds\n", cmd));
builtin_print_error_trailer(parser, streams.err, cmd);
return STATUS_INVALID_ARGS;
}