diff options
author | Jim Meyering <jim@meyering.net> | 2003-05-10 14:37:12 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-05-10 14:37:12 +0000 |
commit | b037820eb478cc84126e360e01b97551694affc4 (patch) | |
tree | 02698a202461784730abe723fcb93e023f9d0a08 /src | |
parent | 7afaa765d30d8517a2b7e6423423c566ad774a9a (diff) | |
download | coreutils-b037820eb478cc84126e360e01b97551694affc4.tar.xz |
(main): Handle argc < optind.
Diffstat (limited to 'src')
-rw-r--r-- | src/mv.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* mv -- move or rename files - Copyright (C) 86, 89, 90, 91, 1995-2002 Free Software Foundation, Inc. + Copyright (C) 86, 89, 90, 91, 1995-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -445,7 +445,7 @@ main (int argc, char **argv) } } - n_files = argc - optind; + n_files = (optind < argc ? argc - optind : 0); file = argv + optind; target_directory_specified = (target_directory != NULL); |