mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-06 08:08:53 +08:00
fix: fpga_compress : now handles more than two files (@satsuoni)
This commit is contained in:
parent
674db8d5ac
commit
28c3aa61ce
1 changed files with 6 additions and 2 deletions
|
@ -294,12 +294,16 @@ int main(int argc, char **argv)
|
||||||
} else {
|
} else {
|
||||||
num_input_files = argc-2;
|
num_input_files = argc-2;
|
||||||
}
|
}
|
||||||
|
int adder = (hardnested_mode) ? 2 : 1;
|
||||||
|
|
||||||
infiles = calloc(num_input_files, sizeof(FILE*));
|
infiles = calloc(num_input_files, sizeof(FILE*));
|
||||||
for (uint16_t i = 0; i < num_input_files; i++) {
|
for (uint16_t i = 0; i < num_input_files; i++) {
|
||||||
infiles[i] = fopen(argv[i+hardnested_mode?2:1], "rb");
|
infiles[i] = fopen(argv[i + adder ] , "rb");
|
||||||
if (infiles[i] == NULL) {
|
if (infiles[i] == NULL) {
|
||||||
fprintf(stderr, "Error. Cannot open input file %s", argv[i+hardnested_mode?2:1]);
|
fprintf(stderr, "Error. Cannot open input file %s", argv[i + adder] );
|
||||||
return(EXIT_FAILURE);
|
return(EXIT_FAILURE);
|
||||||
|
} else {
|
||||||
|
printf("Opening %s %d \n", argv[i + adder], i+adder );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outfile = fopen(argv[argc-1], "wb");
|
outfile = fopen(argv[argc-1], "wb");
|
||||||
|
|
Loading…
Reference in a new issue