set file_size in read mode
authorEd Bordin <edbordin@gmail.com>
Sun, 26 Jul 2020 03:24:50 +0000 (13:24 +1000)
committerGreg Davill <greg.davill@gmail.com>
Sun, 20 Sep 2020 10:38:25 +0000 (20:08 +0930)
currently it stays set to -1 and ecpprog reports e.g. "reading..    4190208/4294967295" (the latter number being 0xFFFFFFFF)

ecpprog/ecpprog.c

index eba15e4044b20c6f8d013a8a84b372b2b876db40..8a5724e862a6a2662f6c36712f0bddf413eed2ea 100644 (file)
@@ -908,6 +908,7 @@ int main(int argc, char **argv)
                        perror(0);
                        return EXIT_FAILURE;
                }
+               file_size = read_size;
        } else {
                f = (strcmp(filename, "-") == 0) ? stdin : fopen(filename, "rb");
                if (f == NULL) {