libmisc/shell/chmod: Fix multiple file arguments to the command

Closes #4558
This commit is contained in:
Chris Johns
2023-01-30 13:37:42 +11:00
parent 05461aa475
commit 2243fd6d6b

View File

@@ -53,7 +53,7 @@ static int rtems_shell_main_chmod(
* Now change the files modes
*/
for (n=2 ; n < argc ; n++)
chmod(argv[n++], mode);
chmod(argv[n], mode);
return 0;
}