1
0
Fork 0
mirror of https://github.com/ErikAndren/cue2pops-mac.git synced 2025-04-19 15:38:04 +02:00

Correct string copy when passing two arguments

This commit is contained in:
Erik Andrén Zachrisson 2015-11-01 19:19:57 +01:00
parent 2ec80869cf
commit e6ea357cb7

View file

@ -395,7 +395,11 @@ int main(int argc, char **argv)
if(argc == 3) { // PROGRAM.EXE INPUT.CUE <CMD_1/OUTPUT>
if (!EvaluateArg(argv[2])) {
// else,argv[2] is the output file name
strcpy(vcd_name, argv[2]);
vcd_name = strdup(argv[2]);
if (vcd_name == NULL) {
printf("Error: Failed to copy destination string\n");
return 0;
}
}
}