Added error check for if the input and output files are the same
This commit is contained in:
parent
fea8bf485c
commit
aecc11163f
|
@ -52,6 +52,11 @@ int main(const int argc, const char* argv[])
|
|||
|
||||
std::string inputFile(argv[1]);
|
||||
std::string outputFile(argv[2]);
|
||||
if (inputFile == outputFile)
|
||||
{
|
||||
fprintf(stderr, "Error: Input and output file cannot be the same!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
FileType inputType = GetFileType(inputFile);
|
||||
FileType outputType = GetFileType(outputFile);
|
||||
|
|
Loading…
Reference in New Issue
Block a user