summaryrefslogtreecommitdiff
path: root/more.c
diff options
context:
space:
mode:
Diffstat (limited to 'more.c')
-rw-r--r--more.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/more.c b/more.c
index c3b08eb..84f1185 100644
--- a/more.c
+++ b/more.c
@@ -352,12 +352,13 @@ static void adjust_args(int *argc, char ***argv)
}
for (int i = 1; i < *argc; i++) {
- if (!strcmp(**argv, "--")) {
+ if (!strcmp((*argv)[i], "--")) {
return;
}
- if (**argv[0] == '+') {
- **argv[0] = '-';
+ if ((*argv)[i][0] == '+') {
+ fprintf(stderr, "more: adjusting command line option +%s to -%s\n", (*argv)[i] + 1, (*argv)[i] + 1);
+ (*argv)[i][0] = '-';
}
}
}