Check to make sure we have an input file.

This commit is contained in:
Jacob 2023-08-16 08:10:33 +02:00
parent b9316ad4ec
commit 0abf3a803a

View file

@ -152,6 +152,11 @@ int main(int argc, char **argv) {
exit(1);
}
if (argc < 4) {
std::cout << "mcopy: You must specify a file to copy.\n";
exit(1);
}
for (int i{1}; i < ac; i++) {
std::ifstream f(av[i]);