]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/fpga_compress.c
Compress the .data section as well (saves another 4KBytes and comes for free)
[proxmark3-svn] / client / fpga_compress.c
index d4376ccc96a1cdc50f92bcc21e1ba0f258639005..5164f6d41bbb6612255d943a0c7cdf5b5cac6ebd 100644 (file)
@@ -85,7 +85,11 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile)
                for(uint16_t j = 0; j < num_infiles; j++) {
                        for(uint16_t k = 0; k < FPGA_INTERLEAVE_SIZE; k++) {
                                c = fgetc(infile[j]);
                for(uint16_t j = 0; j < num_infiles; j++) {
                        for(uint16_t k = 0; k < FPGA_INTERLEAVE_SIZE; k++) {
                                c = fgetc(infile[j]);
-                               if (!feof(infile[j])) fpga_config[i++] = c; else fpga_config[i++] = '\0';
+                               if (!feof(infile[j])) {
+                                       fpga_config[i++] = c;
+                               } else if (num_infiles > 1) {
+                                       fpga_config[i++] = '\0';
+                               }
                        }
                }
 
                        }
                }
 
Impressum, Datenschutz