set file_size in read mode
authorEd Bordin <edbordin@gmail.com>
Sun, 26 Jul 2020 03:24:50 +0000 (13:24 +1000)
committerGitHub <noreply@github.com>
Sun, 26 Jul 2020 03:24:50 +0000 (13:24 +1000)
currently it stays set to -1 and ecpprog reports e.g. "reading..    4190208/4294967295" (the latter number being 0xFFFFFFFF)

ecpprog/ecpprog.c

index 15368e9caa87e0008629f62f43d843365aa8b096..c9550e46503b1f2337c8389e645ff15f4f77fa03 100644 (file)
@@ -867,6 +867,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) {